Generate a random map when changing floor

This commit is contained in:
Yohann D'ANELLO 2021-01-08 20:00:42 +01:00
parent d8d0bc6190
commit 571857b063
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 1 additions and 4 deletions

View File

@ -53,7 +53,6 @@ class Game:
"""
Creates a new game on the screen.
"""
# TODO generate a new map procedurally
self.maps = []
self.map_index = 0
self.map = broguelike.Generator().run()
@ -188,9 +187,7 @@ class Game:
self.map_index = 0
return
while self.map_index >= len(self.maps):
# TODO: generate a new map
self.maps.append(Map.load(ResourceManager.get_asset_path(
"example_map_2.txt")))
self.maps.append(broguelike.Generator().run())
new_map = self.map
new_map.floor = self.map_index
old_map.remove_entity(self.player)