From c996b4a9c39bdb8c1da7d29c80cb1c077e3e3c9e Mon Sep 17 00:00:00 2001 From: Garmelon Date: Fri, 12 Feb 2016 21:36:08 +0100 Subject: [PATCH] Implement mark_adjacent function --- maze.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/maze.py b/maze.py index e81bc25..2946916 100644 --- a/maze.py +++ b/maze.py @@ -81,7 +81,10 @@ class Maze: 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): """