Doors #156

Merged
ynerant merged 9 commits from doors into map_generation 2021-01-10 22:54:14 +00:00
3 changed files with 5 additions and 2 deletions
Showing only changes of commit e744310861 - Show all commits

View File

@ -82,6 +82,7 @@ TexturePack.ASCII_PACK = TexturePack(
BOW=')',
CHEST='',
CHESTPLATE='(',
DOOR='&',
EAGLE='µ',
EMPTY=' ',
EXPLOSION='%',
@ -124,6 +125,8 @@ TexturePack.SQUIRREL_PACK = TexturePack(
BOW='🏹',
CHEST='🧰',
CHESTPLATE='🦺',
DOOR=('🚪', curses.COLOR_WHITE, (1000, 1000, 1000),
curses.COLOR_WHITE, (1000, 1000, 1000)),
EAGLE='🦅',
EMPTY=' ',
EXPLOSION='💥',

View File

@ -390,6 +390,7 @@ class Tile(Enum):
WALL = auto()
FLOOR = auto()
LADDER = auto()
DOOR = auto()
@staticmethod
def from_ascii_char(ch: str) -> "Tile":

View File

@ -83,8 +83,7 @@ class Generator:
def place_room(level: List[List[Tile]], y: int, x: int,
room: List[List[Tile]], door_y: int, door_x: int) -> None:
rh, rw = len(room), len(room[0])
# maybe place Tile.DOOR here ?
level[y][x] = Tile.FLOOR
level[y][x] = Tile.DOOR
for ry in range(rh):
for rx in range(rw):
if room[ry][rx] == Tile.FLOOR: