コード例 #1
0
 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']
コード例 #2
0
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()
コード例 #3
0
 def __init__(self, obj):
     super().__init__(obj)
     self.seat = SeatInfo(obj['Seat'])