Monsters are hedgehogs 🦔

This commit is contained in:
Yohann D'ANELLO
2020-11-10 21:47:36 +01:00
parent 3f374d2558
commit 3f4c809db6
8 changed files with 24 additions and 15 deletions

View File

@@ -15,6 +15,9 @@ class TexturePack:
self.__dict__.update(**kwargs)
TexturePack._packs[name] = self
def __getitem__(self, item):
return self.__dict__[item]
@classmethod
def get_pack(cls, name: str) -> "TexturePack":
return cls._packs[name.lower()]
@@ -26,6 +29,7 @@ TexturePack.ASCII_PACK = TexturePack(
WALL='#',
FLOOR='.',
PLAYER='@',
HEDGEHOG='*',
)
TexturePack.SQUIRREL_PACK = TexturePack(
@@ -34,4 +38,5 @@ TexturePack.SQUIRREL_PACK = TexturePack(
WALL='',
FLOOR='.',
PLAYER='🐿️',
HEDGEHOG='🦔',
)