mirror of
https://github.com/kuhyx/WUT_Computer_Science.git
synced 2026-11-21 14:12:24 +01:00
fix typos
This commit is contained in:
parent
9242930433
commit
057197ee38
4
main.py
4
main.py
@ -59,7 +59,7 @@ class MazeSolver:
|
|||||||
# If it is not a "wall" (#) add its position to list of neighbors
|
# If it is not a "wall" (#) add its position to list of neighbors
|
||||||
|
|
||||||
def get_neighbors(self, position):
|
def get_neighbors(self, position):
|
||||||
'''Finds point's neighbours'''
|
'''Finds point's neighbors'''
|
||||||
row, col = position
|
row, col = position
|
||||||
neighbors = []
|
neighbors = []
|
||||||
if row > 0 and self.maze[row - 1][col] != '#':
|
if row > 0 and self.maze[row - 1][col] != '#':
|
||||||
@ -89,7 +89,7 @@ class MazeSolver:
|
|||||||
self.start]))
|
self.start]))
|
||||||
|
|
||||||
# Go through queue until it's empty
|
# Go through queue until it's empty
|
||||||
# Find neighbor (which is not wall) closests to the
|
# Find neighbor (which is not wall) closest to the
|
||||||
# END point (based on heuristic)
|
# END point (based on heuristic)
|
||||||
# Go there and repeat
|
# Go there and repeat
|
||||||
# if cannot find path it starts over but skips the path that lead it to
|
# if cannot find path it starts over but skips the path that lead it to
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user