def execute(self, owner, event, msg_dict=None):
     super(PromptDiscardState, self).execute(owner, event, msg_dict)
     from logic.player_action import action
     if event == "action":
         action(owner, msg_dict.get("action_id"))
     else:
         owner.table.logger.warn("player {0} event {1} not register".format(owner.seat, event))
示例#2
0
 def execute(self, owner, event, proto=None):
     super(PromptYaoState, self).execute(owner, event, proto)
     from logic.player_action import action
     if event == "action":
         action(owner, proto)
     else:
         owner.table.logger.warn("player {0} event {1} not register".format(
             owner.seat, event))
示例#3
0
 def execute(self, owner, event, proto=None):
     super(PromptDrawState, self).execute(owner, event, proto)
     from logic.player_action import action, discard
     if event == "action":
         action(owner, proto)
     elif event == "discard" and owner.table.state != 'HaiDiState':
         discard(owner, proto)
     else:
         owner.table.logger.warn("player {0} event {1} not register".format(owner.seat, event))
         proto_re = game_pb2.CommonNotify()
         proto_re.messageId = PLAYER_MSG_RECONNECT
         send(NOTIFY_MSG, proto_re, owner.session)