Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion FinalMazeCodingChallenge_AstarAlgo/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def is_legal_pos(maze, pos):
x,y = pos
x_rows= len(maze)
y_cols = len(maze[0])
return 0 < x <= x_rows and 0 < y <=y_cols and maze[x][y] != "0"
return 0 <= x < x_rows and 0 <= y < y_cols and maze[x][y] != "0"


def get_path(predecessor, start, goal):
Expand Down