From 865a3e3b71a92c19b947239f238660686faf92db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Gia=20Phong?= Date: Tue, 28 Aug 2018 23:05:44 +0700 Subject: [PATCH] Clarify what happens behind mouse move and close #10 --- brutalmaze/maze.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brutalmaze/maze.py b/brutalmaze/maze.py index 15610dd..da0de7c 100644 --- a/brutalmaze/maze.py +++ b/brutalmaze/maze.py @@ -445,10 +445,10 @@ class Maze: self.stepx = w - e return + # Forest Fire algorithm with step count queue = defaultdict(list, {0: [(self.destx, self.desty)]}) visited, count, distance = set(), 1, 0 while count: - # Hashes of small intergers are themselves so queue is sorted if not queue[distance]: distance += 1 x, y = queue[distance].pop() count -= 1