def test_receive_stone(self): player1 = GoPlayerBase("player1") player1.register() self.assertEqual(None, player1.stone_type) player1.receive_stone(StoneEnum.BLACK) self.assertEqual(StoneEnum.BLACK, player1.stone_type) player2 = GoPlayerBase("player2") player2.register() self.assertEqual(None, player2.stone_type) player2.receive_stone(StoneEnum.WHITE) self.assertEqual(StoneEnum.WHITE, player2.stone_type)
def init_player(): player = GoPlayerBase() player.register() player.receive_stone(StoneEnum.BLACK) return player