From 1d41d9a2f886e355111830d20e3005d182766bbe Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sun, 2 Jul 2017 10:38:17 -0400 Subject: [PATCH] Begin decomposing cond magic numbers. --- make_dungeon.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/make_dungeon.py b/make_dungeon.py index c394b5f..e56bb8f 100755 --- a/make_dungeon.py +++ b/make_dungeon.py @@ -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) -- 2.31.1