Skip to content
Snippets Groups Projects
Commit 8b066718 authored by Michael Mutote's avatar Michael Mutote
Browse files

22202956

touch ups
parent 58302ff3
No related branches found
No related tags found
No related merge requests found
......@@ -17,8 +17,10 @@ grid = ((5, 3, 0, 0, 7, 0, 0, 0, 0),
(0, 0, 0, 4, 1, 9, 0, 0, 5),
(0, 0, 0, 0, 8, 0, 0, 0, 0))
print(breadth_first_search.BreadthFirstSearch(grid, Sucessors.sudoku_successor, is_goal.is_goal_sudoku)[-1])
sln = (breadth_first_search.BreadthFirstSearch(grid, Sucessors.sudoku_successor, is_goal.is_goal_sudoku)[-1])
for rows in sln:
print(rows)
# N Queens
board = ((False, False, False, False, False, False, False, False, False),
......@@ -32,7 +34,11 @@ board = ((False, False, False, False, False, False, False, False, False),
(False, False, False, False, False, False, False, False, False))
print(breadth_first_search.BreadthFirstSearch(board, Sucessors.queens_successor, is_goal.is_goal_queens)[-1])
sln = (breadth_first_search.BreadthFirstSearch(board, Sucessors.queens_successor, is_goal.is_goal_queens)[-1])
output_tuple = tuple(tuple("Q" if value else "-" for value in sln) for sln in sln)
for rows in output_tuple:
print(rows)
puzzle = ()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment