Tiles can have multiple width according to the used texture pack for a better support of unicode

This commit is contained in:
Yohann D'ANELLO
2020-11-10 22:01:57 +01:00
parent 3f4c809db6
commit d5ef041f48
2 changed files with 14 additions and 9 deletions

View File

@@ -2,6 +2,7 @@ class TexturePack:
_packs = dict()
name: str
tile_width: int
EMPTY: str
WALL: str
FLOOR: str
@@ -25,6 +26,7 @@ class TexturePack:
TexturePack.ASCII_PACK = TexturePack(
name="ascii",
tile_width=1,
EMPTY=' ',
WALL='#',
FLOOR='.',
@@ -34,9 +36,10 @@ TexturePack.ASCII_PACK = TexturePack(
TexturePack.SQUIRREL_PACK = TexturePack(
name="squirrel",
EMPTY=' ',
WALL='',
FLOOR='.',
PLAYER='🐿️',
HEDGEHOG='🦔',
tile_width=2,
EMPTY=' ',
WALL='██',
FLOOR='..',
PLAYER='🐿️ ',
HEDGEHOG='🦔 ',
)