summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorNguyễn Gia Phong <vn.mcsinyx@gmail.com>2018-08-28 23:05:44 +0700
committerNguyễn Gia Phong <vn.mcsinyx@gmail.com>2018-08-28 23:05:44 +0700
commit865a3e3b71a92c19b947239f238660686faf92db (patch)
tree850dde93716064e2e2469134171b04760a3b6a7f
parent1e7e981e815dc848a55c1325f6a891b427eb75de (diff)
downloadbrutalmaze-865a3e3b71a92c19b947239f238660686faf92db.tar.gz
Clarify what happens behind mouse move and close #10
-rw-r--r--brutalmaze/maze.py2
1 files changed, 1 insertions, 1 deletions
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