Skip to content

Commit

Permalink
QA fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ZodiusInfuser committed Oct 28, 2024
1 parent 10d7086 commit 9aeca1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/multi_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def draw(self, display):
display.pixel(int(self.x), int(self.y))

def is_on_screen(self):
return self.x >= 0 and self.x < WIDTH and self.y >= 0 and self.y < HEIGHT
return self.x >= 0 and self.x < WIDTH and self.y >= 0 and self.y < HEIGHT

def has_hit(self, player):
xdiff = self.x - player.x
Expand Down
4 changes: 1 addition & 3 deletions examples/random_maze.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def build(self, width, height):
raise ValueError("width out of range. Expected greater than 0")

if height <= 0:
raise ValueError(f"height out of range. Expected greater than 0")
raise ValueError("height out of range. Expected greater than 0")

self.width = width
self.height = height
Expand Down Expand Up @@ -149,7 +149,6 @@ def build(self, width, height):
self.grid_columns = (self.width * 2 + 1)
self.grid_rows = (self.height * 2 + 1)


def choose_neighbour(self, current):
unvisited = []
for dx in range(-1, 2, 2):
Expand Down Expand Up @@ -243,7 +242,6 @@ def build_maze():
height = random.randrange(MIN_MAZE_HEIGHT, MAX_MAZE_HEIGHT)
builder.build(width + difficulty, height + difficulty)


wall_separation = min(HEIGHT // builder.grid_rows,
WIDTH // builder.grid_columns)
wall_size = wall_separation - WALL_GAP
Expand Down

0 comments on commit 9aeca1b

Please sign in to comment.