def encode(self): d = OrderedDict() d['IdTable'] = self.id_table d['NbPlayers'] = self.nb_players d['PossibleAction'] = LobbyActionEnum.to_string(self.possible_action) d['Params'] = self.params.encode() return d
def decode(cls, obj): return cls( obj["IdTable"], obj["NbPlayers"], LobbyActionEnum.parse(obj['PossibleAction']), TableParams.decode(obj['Params']) )
def __str__(self): return '{0}({1}) {2} [{3}]'.format( self.id_table, self.nb_players, LobbyActionEnum.to_string(self.possible_action), self.params )