Skip to content
This repository has been archived by the owner on Nov 30, 2020. It is now read-only.

Commit

Permalink
Remove debugging print and improve style
Browse files Browse the repository at this point in the history
  • Loading branch information
McSinyx committed Oct 13, 2019
1 parent 7d346a2 commit e2149b1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion brutalmaze/game.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 3 additions & 6 deletions brutalmaze/maze.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,8 @@ def new_map(self):
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))
Expand Down Expand Up @@ -480,10 +479,8 @@ def set_step(self, check=(lambda x, y: True)):
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
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

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',
Expand Down

0 comments on commit e2149b1

Please sign in to comment.