Example #1
0
    def test_switch_turn1(self):
        """ Test switching the turn to the white player. """
        g = GessGame()

        g.switch_turn()

        self.assertEqual(g._players[1], g.get_active_player())
Example #2
0
    def test_switch_turn2(self):
        """ Test switching the turn back to the black player. """
        g = GessGame()

        g.switch_turn()
        g.switch_turn()

        self.assertEqual(g._players[0], g.get_active_player())
Example #3
0
    def test_get_active_player(self):
        """ Tests returning the active player. """
        g = GessGame()

        self.assertEqual('b', g.get_active_player().get_stone())