diff --git a/maze.py b/maze.py index 3cfb2b7..416071a 100644 --- a/maze.py +++ b/maze.py @@ -39,6 +39,7 @@ class Maze: for x in range(self.size): if self.grid[y][x] == '1': screen.blit(wall_texture, (x * tile_size, y * tile_size)) + continue if self.grid[y][x].startswith('g'): screen.blit(coin_texture, (x * tile_size, y * tile_size)) @@ -75,7 +76,7 @@ class Maze: if self.grid[y][x].startswith('|') or self.grid[y][x].startswith('-'): font = pygame.font.SysFont(None, tile_size // 2) - num = 12 + num = int(self.grid[y][x][1:]) center = (x * tile_size + tile_size // 2, y * tile_size + tile_size // 2) radius = tile_size // 3 pygame.draw.circle(screen, (255, 215, 0), center, radius) @@ -83,7 +84,7 @@ class Maze: text = font.render(str(num), True, (0, 0, 0)) text_rect = text.get_rect(center=center) screen.blit(text, text_rect) - + continue if self.grid[y][x].startswith('s'): font = pygame.font.SysFont(None, tile_size // 2) text = "s" @@ -94,7 +95,7 @@ class Maze: text = font.render(text, True, (0, 0, 0)) text_rect = text.get_rect(center=center) screen.blit(text, text_rect) - + continue if self.grid[y][x].startswith('e'): font = pygame.font.SysFont(None, tile_size // 2) text = "e"