Exemple #1
0
def build_chess(size, pieces, verbose):
    width, height = size
    # assert len(pieces) <= (width * height) / 2
    board = ChessBoard(width, height, pieces, verbose=verbose)
    t = datetime.now()
    board.find_combinations()
    print(board.get_combinations_number(), datetime.now() - t)
Exemple #2
0
 def test_unique_result(self):
     board = ChessBoard(3, 3, ['K', 'K', 'R'])
     board.find_combinations()
     self.assertEqual(board.get_combinations_number(), 4)