Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def solve(board):
- if solved():
- return True
- if stuck():
- return False
- for move in every_possible_move():
- try_move(board, move) # modifies board
- if solved(board):
- return True
- untry_move(board, move) # modifies board
- return False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement