diff options
author | Diego Roversi <diegor@tiscali.it> | 2019-09-15 15:31:24 +0200 |
---|---|---|
committer | Diego Roversi <diegor@tiscali.it> | 2019-09-15 15:31:24 +0200 |
commit | 2d887c2c2bbe1492fee3e459e4bf17abe2163628 (patch) | |
tree | 627b483d61ac865177e948a3baa0aa1189c8e2b8 /bubbob/levels | |
parent | f2779197b13fdbbd0d42e48215c51d24d86ee91b (diff) |
fixes on RandomLevels.py, rename rnglevel in rnglevel.py, convert a float division to int division
Diffstat (limited to 'bubbob/levels')
-rw-r--r-- | bubbob/levels/RandomLevels.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bubbob/levels/RandomLevels.py b/bubbob/levels/RandomLevels.py index 708c87f..16cc5ef 100644 --- a/bubbob/levels/RandomLevels.py +++ b/bubbob/levels/RandomLevels.py @@ -233,7 +233,7 @@ class Shape: rng_angle[self.lines])) if self.platforms: nplat = dice(2,4,0) - if nplat: space = flat((lvl.HEIGHT-1)/nplat/2,(lvl.HEIGHT-1)/nplat/2-1) + if nplat: space = flat((lvl.HEIGHT-1)//nplat//2,(lvl.HEIGHT-1)//nplat//2-1) else: space = 1 if self.platholes: nholes = lambda : dice(1,3) @@ -278,8 +278,8 @@ class Shape: if self.straightfall: lvl.genwalls.append((RandomLevel.prevent_straight_fall, )) - if self.mirrored: - lvl.genwalls.append((RandomLevel.mirror, )) + if self.mirrored: + lvl.genwalls.append((RandomLevel.mirror, )) if self.enlargeholes: lvl.genwalls.append((RandomLevel.enlarge_tiny_holes, )) @@ -358,5 +358,5 @@ if __name__ == '__main__': print(s.__dict__) else: rnglevel = {} - exec(compile(open('levels/rnglevel', "rb").read(), 'levels/rnglevel', 'exec'), rnglevel) + exec(compile(open('levels/rnglevel.py', "rb").read(), 'levels/rnglevel.py', 'exec'), rnglevel) RandomLevel = rnglevel['RandomLevel'] |