Example #1
0
    def test_is_end_of_the_game(self):

        board = ChessBoard()

        self.assertFalse(board.is_end())
        # get one of the Kings
        board.set_end_of_the_game("wk")
        self.assertTrue(board.is_end())
Example #2
0
    def test_set_end_of_the_game(self):
        board = ChessBoard()

        # at the beginning of the game the state is zero
        self.assertNotEqual(1, board._finish_game)

        # get one of the Kings
        board.set_end_of_the_game("wk")
        self.assertEqual(1, board._finish_game)