More modularity, add properties in tiles

This commit is contained in:
Yohann D'ANELLO
2020-10-16 17:47:52 +02:00
committed by Nicolas Margulies
parent 9c6f22ccf8
commit d8401d9920
2 changed files with 15 additions and 10 deletions

View File

@ -40,6 +40,12 @@ class Tile(Enum):
WALL = '#'
FLOOR = '.'
def is_wall(self) -> bool:
return self == Tile.WALL
def can_walk(self) -> bool:
return not self.is_wall()
class Entity:
x: int