Skip to content
Snippets Groups Projects
  • Michael Mutote's avatar
    73e116b2
    22202956 · 73e116b2
    Michael Mutote authored
    breadth first algorithm untouched. Sudoku Successors and allowed moves completed. Tested with solution testing.py. Sudoku is_goal also completed
    73e116b2
    History
    22202956
    Michael Mutote authored
    breadth first algorithm untouched. Sudoku Successors and allowed moves completed. Tested with solution testing.py. Sudoku is_goal also completed
is_goal.py 267 B
MAZE_GOAL = (0, 4)


def is_goal_maze(state):
    return MAZE_GOAL == state


def is_goal_sudoku(state):
    y, x = 10, 10
    for i, s in enumerate(state):
        if 0 in s:
            (y, x) = (i, s.index(0))
            break
    return ((y, x) == (10, 10))