Exemple #1
0
 def test_mate_stalemate(self):
     """ Test for test_if_mate() stalemate """
     game = Game()
     game.board.clear_board()
     game.castling_rights = ["", "", "", ""]
     game.board.place_piece("K", "H8")
     game.board.place_piece("q", "G6")
     self.assertEqual(game.test_if_mate(), STALEMATE)
Exemple #2
0
 def test_mate_checkmate(self):
     """ Test for test_if_mate() checkmate """
     game = Game()
     game.castling_rights = ["", "", "", ""]
     game.board.remove_piece("D1")
     game.board.remove_piece("C1")
     game.board.place_piece("r", "C1")
     self.assertEqual(game.test_if_mate(), CHECKMATE)