Ejemplo n.º 1
0
    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)
Ejemplo n.º 2
0
def init_player():
    player = GoPlayerBase()
    player.register()
    player.receive_stone(StoneEnum.BLACK)
    return player