Generate a random map when changing floor
This commit is contained in:
parent
d8d0bc6190
commit
571857b063
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue