Begin decomposing cond magic numbers.
authorEric S. Raymond <esr@thyrsus.com>
Sun, 2 Jul 2017 14:38:17 +0000 (10:38 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Sun, 2 Jul 2017 14:55:02 +0000 (10:55 -0400)
make_dungeon.py

index c394b5f516d20c0b4d74017a17b84d12ce1b21d8..e56bb8fa89a7c9875ea120d0dced7826637c8f55 100755 (executable)
@@ -716,10 +716,11 @@ def buildtravel(locs, objs):
         elif travel:
             travel[-1][-1] = not travel[-1][-1]
         while rule:
+            cond = newloc // 1000
             travel.append([rule.pop(0),
-                           newloc // 1000,
+                           cond,
                            newloc % 1000,
-                           (newloc//1000)==100,
+                           cond==100,
                            False])
         travel[-1][-1] = True
     return (travel, tkey)