This looks like it gets the terminators right.
authorEric S. Raymond <esr@thyrsus.com>
Tue, 27 Jun 2017 17:23:30 +0000 (13:23 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Tue, 27 Jun 2017 17:23:30 +0000 (13:23 -0400)
newdungeon.py

index 6f95bb4232277da9b650112c761fa31184dd8529..52c34e5ff5913e70135fb1a94f07831696c0acea 100755 (executable)
@@ -598,8 +598,8 @@ def buildtravel(locs, objs, voc):
         if loc != oldloc:
             tkey.append(len(travel))
             oldloc = loc 
-            if travel:
-                travel[-1] *= -1
+        elif travel:
+            travel[-1] *= -1
         while rule:
             travel.append(rule.pop(0) + newloc * 1000)
         travel[-1] *= -1