Render paths

This commit is contained in:
henriquenakashima 2021-03-28 16:09:33 -04:00
parent 146aa11675
commit d9916579b6
8 changed files with 132 additions and 26 deletions

View file

@ -46,13 +46,17 @@ class QuestPath(enum.Enum):
FORWARD_LEFT = 'forward_left'
FORWARD_RIGHT = 'forward_right'
@property
def description(self):
return str(self)
@dataclasses.dataclass
class MapEncounter:
type: EncounterType
@property
def description(self):
def description(self) -> str:
return str(self.type)
@ -63,5 +67,6 @@ class QuestMap:
# Inaccessible encounters can be None (like in last line).
self.encounters: List[List[MapEncounter]] = []
# List of rows of diagonal paths, each row has 2 paths.
self.diagonals: List[List[QuestPath]] = []
# List of rows of straight and diagonal paths, each row has 5 paths:
# 3 on the columns and 2 between them, sorted from left to right.
self.paths: List[List[QuestPath]] = []