def test_material_stalemate_knights(self): game = Game() for x in range(0,8): for y in range(0,8): game.board[x][y] = None game.board[3][0] = King(3,0,'white') game.board[7][2] = King(7,2,'black') game.board[0][0] = Knight(0,0,'white') game.backup_board = deepcopy(game.board) self.assertTrue(game.material_stalemate()) game.board[4][4] = Knight(4,4,'black') game.backup_board = deepcopy(game.board) self.assertFalse(game.material_stalemate()) game.board[7][0] = Knight(7,0,'black') game.backup_board = deepcopy(game.board) self.assertFalse(game.material_stalemate())
def test_material_stalemata_kings(self): game = Game() for x in range(0,8): for y in range(0,8): game.board[x][y] = None game.board[3][0] = King(3,0,'white') game.board[7][2] = King(7,2,'black') game.backup_board = deepcopy(game.board) #printb(game.board) self.assertTrue(game.material_stalemate())