Implement mark_adjacent function
This commit is contained in:
parent
f407a8e2a8
commit
c996b4a9c3
1 changed files with 4 additions and 1 deletions
5
maze.py
5
maze.py
|
|
@ -81,7 +81,10 @@ class Maze:
|
||||||
|
|
||||||
Marks all cells adjacent to x, y as "?" and add them to the queue.
|
Marks all cells adjacent to x, y as "?" and add them to the queue.
|
||||||
"""
|
"""
|
||||||
pass
|
for xn, yn in self.get_neighbours(x, y):
|
||||||
|
if self.get_cell(xn, yn) == " ":
|
||||||
|
self.set_cell(xn, yn, "?")
|
||||||
|
self.queue.append((xn, yn))
|
||||||
|
|
||||||
def replace(self, val1, val2):
|
def replace(self, val1, val2):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue