def __init__(self, obj): super().__init__(obj) self.params = TableParams(obj['Params']) self.total_pot_amount = obj['TotalPotAmount'] self.pots_amount = obj['PotsAmount'] self.board_cards = obj['BoardCards'] self.seats = [SeatInfo(x) for x in obj['Seats']] self.game_has_started = obj['GameHasStarted']
class SeatUpdatedCommand(AbstractGameCommand): def __init__(self, obj): super().__init__(obj) self.seat = SeatInfo(obj['Seat']) def __str__(self): return '{0} ({1})'.format( super().__str__(), self.seat ) def _encode_specific(self, d): super()._encode_specific(d) d['Seat'] = self.seat.encode()
def __init__(self, obj): super().__init__(obj) self.seat = SeatInfo(obj['Seat'])