-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmap.py
39 lines (32 loc) · 1016 Bytes
/
map.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from location import Location
from characters import Character
from item import Item
from char_actions import Attack, Action
#{"locations": {"cave": {"description": "You are in a dank place.",
# "items": [],
# "characters": []},
# "forest": {"description": "You are in a lush place.",
# "items": [],
# "characters": []},
# "castle": {"description": "You are in a castle.",
# "items": [],
# "characters": []}},
# "adjacencies": {"cave": ["forest", "castle"],
# "forest": ["castle", "cave"],
# "castle": ["forest", "cave"]},
# "start": "cave"}
#
data = {}
start = None
#INIT LOCATIONS HERE
forest = Location("forest", "You are in a lush place.")
data["forest"] = forest
cave = Location("cave", "You are in a dank place.")
data["cave"] = cave
#ADD ITEMS HERE
#ADD CHARACTERS HERE
#DECLARE ADJACENCY HERE
data["forest"].add_adj(data["cave"])
data["cave"].add_adj(data["forest"])
#PUT START LOCATION HERE
start = data["forest"]