def auto_shot_poker(self): pokers = [] if not self.table.last_shot_poker or self.table.last_shot_seat == self.seat: pokers.append(self.hand_pokers[0]) else: pokers = rule.cards_above(self.hand_pokers, self.table.last_shot_poker) packet = [Pt.REQ_SHOT_POKER, pokers] # IOLoop.current().add_callback(self.to_server, packet) IOLoop.current().call_later(2, self.to_server, packet)