Monsters are hedgehogs 🦔
This commit is contained in:
@ -14,6 +14,7 @@ class Map:
|
||||
width: int
|
||||
height: int
|
||||
tiles: List[List["Tile"]]
|
||||
entities: List["Entity"]
|
||||
# coordinates of the point that should be
|
||||
# on the topleft corner of the screen
|
||||
currentx: int
|
||||
@ -73,7 +74,7 @@ class Map:
|
||||
|
||||
def spawn_random_entities(self, count: int) -> None:
|
||||
"""
|
||||
Put randomly {count} squirrels on the map, where it is available.
|
||||
Put randomly {count} hedgehogs on the map, where it is available.
|
||||
"""
|
||||
for _ in range(count):
|
||||
y, x = 0, 0
|
||||
@ -82,10 +83,10 @@ class Map:
|
||||
tile = self.tiles[y][x]
|
||||
if tile.can_walk():
|
||||
break
|
||||
from dungeonbattle.entities.monsters import Squirrel
|
||||
squirrel = Squirrel()
|
||||
squirrel.move(y, x)
|
||||
self.add_entity(squirrel)
|
||||
from dungeonbattle.entities.monsters import Hedgehog
|
||||
hedgehog = Hedgehog()
|
||||
hedgehog.move(y, x)
|
||||
self.add_entity(hedgehog)
|
||||
|
||||
|
||||
class Tile(Enum):
|
||||
|
Reference in New Issue
Block a user