コード例 #1
0
ファイル: player_test.py プロジェクト: neo-godlike/pokerbot
 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)
コード例 #2
0
 def deserialize(self, serial):
     seats = self()
     seats.players = [Player.deserialize(s) for s in serial]
     return seats
コード例 #3
0
ファイル: seats.py プロジェクト: ishikota/PyPokerEngine
 def deserialize(self, serial):
   seats = self()
   seats.players = [Player.deserialize(s) for s in serial]
   return seats