summaryrefslogtreecommitdiff
path: root/bubbob/test_rnglevel.py
diff options
context:
space:
mode:
authorDiego Roversi <diegor@tiscali.it>2019-09-08 22:05:57 +0200
committerDiego Roversi <diegor@tiscali.it>2019-09-08 22:05:57 +0200
commitc23b138ed72d794521b19ff7d8076b32b0b7bf46 (patch)
treec8e82a4ca4da05ba1ad28d4ff64a157bc1eb7952 /bubbob/test_rnglevel.py
parent1d9925c287b318ec21343e2682b51ab6a36ae8db (diff)
2to3
Diffstat (limited to 'bubbob/test_rnglevel.py')
-rw-r--r--bubbob/test_rnglevel.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/bubbob/test_rnglevel.py b/bubbob/test_rnglevel.py
index 6b65514..fa743e1 100644
--- a/bubbob/test_rnglevel.py
+++ b/bubbob/test_rnglevel.py
@@ -31,12 +31,12 @@ while idx < len(sys.argv):
if arg == '-seed':
arg = sys.argv[idx]
idx += 1
- print "Using seed: " + arg + "\n"
+ print("Using seed: " + arg + "\n")
random.seed(arg)
def printlvl(level):
if show_lvl:
- print "\n\n"
+ print("\n\n")
for y in range(level.HEIGHT):
str = ""
if show_lvl & 1:
@@ -45,12 +45,12 @@ def printlvl(level):
if str:
str += " | "
str += level.winds[y]
- print str
+ print(str)
for i in range(n_lvls):
- print '%4d:' % i,
+ print('%4d:' % i, end=' ')
d = {'__name__': 'RandomLevels'}
- execfile('levels/RandomLevels.py', d)
+ exec(compile(open('levels/RandomLevels.py', "rb").read(), 'levels/RandomLevels.py', 'exec'), d)
for i, Lvl in enumerate(d['GenerateLevels']()):
level = Lvl(i)
printlvl(level)
@@ -60,5 +60,5 @@ for i in range(n_lvls):
break
else:
for line in level.walls:
- print line
+ print(line)
raise AssertionError("full height wall in column %d" % x)