Start the hero on the down stairs of the level
This commit is contained in:
parent
6c9d01771f
commit
2f9864edd8
1 changed files with 6 additions and 1 deletions
|
@ -74,7 +74,12 @@ class Engine:
|
|||
|
||||
self.entities: MutableSet[Entity] = set()
|
||||
|
||||
self.hero = Hero(position=self.map.random_walkable_position())
|
||||
try:
|
||||
hero_start_position = self.map.up_stairs[0]
|
||||
except IndexError:
|
||||
hero_start_position = self.map.random_walkable_position()
|
||||
self.hero = Hero(position=hero_start_position)
|
||||
|
||||
self.entities.add(self.hero)
|
||||
|
||||
while len(self.entities) < 25:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue