[map_gen_refactor] added extract mapArray to main for bfs

This commit is contained in:
Bartosz Wieczorek 2022-04-08 11:08:17 +02:00
parent 924e7b46ca
commit d1f4424e09
2 changed files with 3 additions and 3 deletions

View File

@ -39,8 +39,8 @@ class Game():
def new(self): def new(self):
# initialize all variables and do all the setup for a new game # initialize all variables and do all the setup for a new game
# sprite groups # sprite groups and map array
self.roadTiles, self.wallTiles = map_new.getTiles() (self.roadTiles, self.wallTiles), self.mapArray = map_new.getTiles()
self.all_sprites = pg.sprite.Group() self.all_sprites = pg.sprite.Group()
self.walls = pg.sprite.Group() self.walls = pg.sprite.Group()

View File

@ -7,7 +7,7 @@ def getTiles():
array = map_utils.generateMap() array = map_utils.generateMap()
pattern = map_pattern.getPattern() pattern = map_pattern.getPattern()
tiles = map_utils.getSprites(array, pattern) tiles = map_utils.getSprites(array, pattern)
return tiles return tiles, array
def renderTiles(tiles, screen, camera, debug=False): def renderTiles(tiles, screen, camera, debug=False):
for tile in tiles: for tile in tiles: