More modularity, add properties in tiles
This commit is contained in:
committed by
Nicolas Margulies
parent
9c6f22ccf8
commit
d8401d9920
@ -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
|
||||
|
Reference in New Issue
Block a user