示例#1
0
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)
示例#2
0
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)
示例#3
0
 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)
示例#4
0
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)
示例#5
0
def execute(userId, message, messageHandle):
    action = ReqSendAction()
    action.ParseFromString(message.data)
    if 1 == action.actionType:
        set_amount_confirm_cmd.execute(userId, message, messageHandle)