Beispiel #1
0
 def test_serialization(self):
   player = self.__setup_player_for_serialization()
   serial = player.serialize()
   restored = Player.deserialize(serial)
   self.eq(player.name, restored.name)
   self.eq(player.uuid, restored.uuid)
   self.eq(player.stack, restored.stack)
   self.eq(player.hole_card, restored.hole_card)
   self.eq(player.action_histories, restored.action_histories)
   self.eq(player.round_action_histories, restored.round_action_histories)
   self.eq(player.pay_info.amount, restored.pay_info.amount)
   self.eq(player.pay_info.status, restored.pay_info.status)
Beispiel #2
0
 def deserialize(self, serial):
     seats = self()
     seats.players = [Player.deserialize(s) for s in serial]
     return seats
Beispiel #3
0
 def deserialize(self, serial):
   seats = self()
   seats.players = [Player.deserialize(s) for s in serial]
   return seats