diff options
author | Nguyễn Gia Phong <vn.mcsinyx@gmail.com> | 2018-03-06 09:58:52 +0700 |
---|---|---|
committer | Nguyễn Gia Phong <vn.mcsinyx@gmail.com> | 2018-03-06 09:58:52 +0700 |
commit | f7c600934e1406fe0d18ce69a948c3622af84d36 (patch) | |
tree | 913a3d552fefed9da40eecb458131c713c079510 /brutalmaze/maze.py | |
parent | 2bafc0c75ac5f9c42593c4905f12bfda66afad1b (diff) | |
download | brutalmaze-f7c600934e1406fe0d18ce69a948c3622af84d36.tar.gz |
Test and fix minor bugs
Diffstat (limited to 'brutalmaze/maze.py')
-rw-r--r-- | brutalmaze/maze.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/brutalmaze/maze.py b/brutalmaze/maze.py index aeaec06..b25662e 100644 --- a/brutalmaze/maze.py +++ b/brutalmaze/maze.py @@ -93,7 +93,7 @@ class Maze: self.distance = (self.w * self.h / 416) ** 0.5 self.x, self.y = self.w // 2, self.h // 2 self.centerx, self.centery = self.w / 2.0, self.h / 2.0 - w, h = (int(i/self.distance/2 + 2) for i in size) + w, h = (int(i/self.distance/2 + 1) for i in size) self.rangex = list(range(MIDDLE - w, MIDDLE + w + 1)) self.rangey = list(range(MIDDLE - h, MIDDLE + h + 1)) self.score = INIT_SCORE @@ -342,7 +342,7 @@ class Maze: self.x, self.y = self.w // 2, self.h // 2 self.centerx = self.x + offsetx*self.distance self.centery = self.y + offsety*self.distance - w, h = int(self.w/self.distance/2 + 2), int(self.h/self.distance/2 + 2) + w, h = int(self.w/self.distance/2 + 1), int(self.h/self.distance/2 + 1) self.rangex = list(range(MIDDLE - w, MIDDLE + w + 1)) self.rangey = list(range(MIDDLE - h, MIDDLE + h + 1)) self.slashd = self.hero.R + self.distance/SQRT2 |