-
Notifications
You must be signed in to change notification settings - Fork 0
/
locations.py
146 lines (118 loc) · 2.43 KB
/
locations.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# game/locations.py
# Define locations and items
ticket_office = {
"name": "ticket office",
"type": "object"
}
dog = {
"name": "dog",
"type": "object"
}
seagull = {
"name": "seagull",
"type": "object"
}
towel = {
"name": "towel",
"type": "object",
}
tree = {
"name": "tree",
"type": "object"
}
bank = {
"name": "bank",
"type": "object",
}
swing = {
"name": "swing",
"type": "object",
}
umbrella = {
"name": "umbrella",
"type": "object",
}
street_a = {
"name": "street a",
"type": "street",
}
street_b = {
"name": "street b",
"type": "street",
}
street_c = {
"name": "street c",
"type": "street",
}
street_d = {
"name": "street d",
"type": "street",
}
map_a = {
"name": "map for street a",
"type": "map",
"target": street_a,
}
map_b = {
"name": "map for street b",
"type": "map",
"target": street_b,
}
map_c = {
"name": "map for street c",
"type": "map",
"target": street_c,
}
map_d = {
"name": "map for street d",
"type": "map",
"target": street_d,
}
park = {
"name": "park",
"type": "location",
}
square = {
"name": "square",
"type": "location",
}
beach = {
"name": "beach",
"type": "location",
}
port = {
"name": "port",
"type": "location",
}
ferry = {
"name": "ferry"
}
all_places = [park, square, beach, port, ferry]
all_streets = [street_a, street_b, street_c, street_d]
# Define which items/rooms are related
object_relations = {
"park": [tree, swing, dog, street_a],
"square": [bank, street_a, street_b, street_c],
"beach": [towel, umbrella, street_b],
"port": [street_c, ticket_office, seagull, street_d],
"tree": [map_a],
"bank": [map_b],
"towel": [map_c],
"ticket office": [map_d],
"street a": [park, square],
"street b": [square, beach],
"street c": [square, port],
"street d": [port, ferry],
}
# Define game state. Do not directly change this dict.
# Instead, when a new game starts, make a copy of this
# dict and use the copy to store gameplay state. This
# way you can replay the game multiple times.
INIT_GAME_STATE = {
"current_location": park,
"maps_collected": [],
"target_location": ferry,
"game_over": False,
"start_time": None,
"end_time": None
}