From: Eric S. Raymond Date: Sun, 2 Jul 2017 14:38:17 +0000 (-0400) Subject: Begin decomposing cond magic numbers. X-Git-Tag: takebird~112 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=1d41d9a2f886e355111830d20e3005d182766bbe;p=open-adventure.git Begin decomposing cond magic numbers. --- 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)