def execute(userId, message, messageHandle): action = ReqSendAction() action.ParseFromString(message.data) if 1 == action.actionType: selnum_cmd.execute(userId, action.data, messageHandle) elif 2 == action.actionType: qiang_cmd.execute(userId, action.data, messageHandle)
def execute(userId, message, messageHandle): action = ReqSendAction() action.ParseFromString(message.data) if 1 == action.actionType: grab_cmd.execute(userId, action.data, messageHandle) if 2 == action.actionType: playscore_cmd.execute(userId, action.data, messageHandle) if 3 == action.actionType: open_cmd.execute(userId, action.data, messageHandle)
def playScore(self): betScoreAction = BaiRenBetScoreAction() betScore = betScoreAction.betScore.add() betScore.score = self.score betScore.index = self.index sendAction = ReqSendAction() sendAction.actionType = 2 sendAction.data = betScoreAction.SerializeToString() self.client.send_data(APPLY_ACTION, sendAction)
def execute(userId, message, messageHandle): action = ReqSendAction() action.ParseFromString(message.data) if 0 == action.actionType: look_cmd.execute(userId, action.data, messageHandle) if 1 == action.actionType: abandon_cmd.execute(userId, action.data, messageHandle) if 2 == action.actionType: playscore_cmd.execute(userId, action.data, messageHandle) if 3 == action.actionType: compare_cmd.execute(userId, action.data, messageHandle)
def execute(userId, message, messageHandle): action = ReqSendAction() action.ParseFromString(message.data) if 1 == action.actionType: set_amount_confirm_cmd.execute(userId, message, messageHandle)