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