Add ladders in the map
This commit is contained in:
parent
ad5ae22e5f
commit
8636d571b5
|
@ -1,8 +1,8 @@
|
||||||
1 6
|
1 6
|
||||||
####### #############
|
####### #############
|
||||||
#.....# #...........#
|
#.H...# #...........#
|
||||||
#.....# #####...........#
|
#.....# #####...........#
|
||||||
#.....# #...............#
|
#.....# #............H..#
|
||||||
#.##### #.###...........#
|
#.##### #.###...........#
|
||||||
#.# #.# #...........#
|
#.# #.# #...........#
|
||||||
#.# #.# #############
|
#.# #.# #############
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
1 17
|
1 17
|
||||||
########### #########
|
########### #########
|
||||||
#.........# #.......#
|
#....H....# #.......#
|
||||||
#.........# ############.......#
|
#.........# ############.......#
|
||||||
#.........###############..........#.......##############
|
#.........###############..........#.......##############
|
||||||
#.........#........................#....................#
|
#.........#........................#....................#
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
########.##########......# #.........# #.........#
|
########.##########......# #.........# #.........#
|
||||||
#...........##......# #.........# #.........#
|
#...........##......# #.........# #.........#
|
||||||
#...........##......# #.........# #.........#
|
#...........##......# #.........# #.........#
|
||||||
#...........##......# #.........# ################.######
|
#...........##..H...# #.........# ################.######
|
||||||
#...........##......# #.........# #.................############
|
#...........##......# #.........# #.................############
|
||||||
#...........##......# ########.########.......#.........#..........#
|
#...........##......# ########.########.......#.........#..........#
|
||||||
#...........##......# #...............#.......#.........#..........#
|
#...........##......# #...............#.......#.........#..........#
|
||||||
|
|
|
@ -64,6 +64,7 @@ TexturePack.ASCII_PACK = TexturePack(
|
||||||
EMPTY=' ',
|
EMPTY=' ',
|
||||||
EXPLOSION='%',
|
EXPLOSION='%',
|
||||||
FLOOR='.',
|
FLOOR='.',
|
||||||
|
LADDER='H',
|
||||||
HAZELNUT='¤',
|
HAZELNUT='¤',
|
||||||
HEART='❤',
|
HEART='❤',
|
||||||
HEDGEHOG='*',
|
HEDGEHOG='*',
|
||||||
|
@ -90,6 +91,7 @@ TexturePack.SQUIRREL_PACK = TexturePack(
|
||||||
EMPTY=' ',
|
EMPTY=' ',
|
||||||
EXPLOSION='💥',
|
EXPLOSION='💥',
|
||||||
FLOOR='██',
|
FLOOR='██',
|
||||||
|
LADDER='🪜',
|
||||||
HAZELNUT='🌰',
|
HAZELNUT='🌰',
|
||||||
HEART='💜',
|
HEART='💜',
|
||||||
HEDGEHOG='🦔',
|
HEDGEHOG='🦔',
|
||||||
|
|
|
@ -198,6 +198,7 @@ class Tile(Enum):
|
||||||
EMPTY = auto()
|
EMPTY = auto()
|
||||||
WALL = auto()
|
WALL = auto()
|
||||||
FLOOR = auto()
|
FLOOR = auto()
|
||||||
|
LADDER = auto()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def from_ascii_char(ch: str) -> "Tile":
|
def from_ascii_char(ch: str) -> "Tile":
|
||||||
|
@ -222,6 +223,12 @@ class Tile(Enum):
|
||||||
"""
|
"""
|
||||||
return self == Tile.WALL
|
return self == Tile.WALL
|
||||||
|
|
||||||
|
def is_ladder(self) -> bool:
|
||||||
|
"""
|
||||||
|
Is this Tile a ladder?
|
||||||
|
"""
|
||||||
|
return self == Tile.LADDER
|
||||||
|
|
||||||
def can_walk(self) -> bool:
|
def can_walk(self) -> bool:
|
||||||
"""
|
"""
|
||||||
Check if an entity (player or not) can move in this tile.
|
Check if an entity (player or not) can move in this tile.
|
||||||
|
|
Loading…
Reference in New Issue