diff options
-rw-r--r-- | brutalmaze/game.py | 2 | ||||
-rw-r--r-- | brutalmaze/maze.py | 9 | ||||
-rwxr-xr-x | setup.py | 2 |
3 files changed, 5 insertions, 8 deletions
diff --git a/brutalmaze/game.py b/brutalmaze/game.py index d6f470e..e8a8b20 100644 --- a/brutalmaze/game.py +++ b/brutalmaze/game.py @@ -17,7 +17,7 @@ # You should have received a copy of the GNU Affero General Public License # along with Brutal Maze. If not, see <https://www.gnu.org/licenses/>. -__version__ = '0.8.27' +__version__ = '0.8.28' import re from argparse import ArgumentParser, FileType, RawTextHelpFormatter diff --git a/brutalmaze/maze.py b/brutalmaze/maze.py index 691f1ed..423b89a 100644 --- a/brutalmaze/maze.py +++ b/brutalmaze/maze.py @@ -139,9 +139,8 @@ class Maze: room, visited = [(MIDDLE, MIDDLE)], set() while room: bit = room.pop() - print(bit) - if not self.isdisplayed(*bit): break if bit not in visited: + if not self.isdisplayed(*bit): break visited.add(bit) for x, y in around(*bit): if self.map[x][y] == EMPTY: room.append((x, y)) @@ -480,10 +479,8 @@ class Maze: queue, visited = deque([(self.destx, self.desty)]), set() while queue: x, y = queue.pop() - if (x, y) not in visited: - visited.add((x, y)) - else: - continue + if (x, y) in visited: continue + visited.add((x, y)) dx, dy = MIDDLE - x, MIDDLE - y if dx**2 + dy**2 <= 2: # Succeeded on finding a path diff --git a/setup.py b/setup.py index 0f98997..a8a5ae8 100755 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ with open('README.rst') as f: setup( name='brutalmaze', - version='0.8.27', + version='0.8.28', description="Minimalist thrilling shoot 'em up game", long_description=long_description, url='https://github.com/McSinyx/brutalmaze', |