-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgameMap.py
More file actions
49 lines (43 loc) · 1.67 KB
/
gameMap.py
File metadata and controls
49 lines (43 loc) · 1.67 KB
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
################################
#hard coded map for the game
##################################
# grid map 0 represent open space, 1 wall, 2 hill
map1Grid = [
[0,0,0,0,0,0,0,0,0,0,0,0,1,0,0],
[0,1,0,1,1,1,0,1,0,1,0,0,0,0,0],
[0,1,0,0,0,0,0,1,0,1,0,1,1,1,0],
[0,1,0,1,0,2,2,2,2,2,0,0,0,0,0],
[0,0,0,0,0,2,2,1,2,2,0,1,0,1,1],
[0,0,1,1,1,2,1,2,2,1,0,0,0,0,0],
[0,0,0,0,0,2,2,1,2,2,1,1,0,0,0],
[1,1,1,0,0,2,2,2,2,2,0,0,1,1,0],
[0,0,0,0,0,0,0,1,0,0,0,0,0,0,0],
[0,0,1,0,1,1,0,0,0,1,0,1,0,1,0],
[0,0,1,0,0,0,0,1,0,0,0,0,0,0,0]
]
map1RallyPoints = [(3,9),(3,5),(7,5),(7,9)]
map1 = (map1Grid,map1RallyPoints)
map2Grid = [
[0,1,1,0,0,0,1,0,0,0,0,0,0,1,0,0,1,0,0],
[0,0,0,1,0,0,0,0,0,0,1,0,1,1,1,0,0,0,0],
[0,1,0,1,0,1,0,0,1,1,1,0,0,0,0,0,1,1,0],
[0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0],
[0,1,1,0,0,0,0,2,2,2,2,2,0,0,0,1,0,1,0],
[0,0,0,0,1,0,1,2,2,1,2,2,0,1,0,1,0,0,0],
[0,0,1,0,1,0,0,2,1,1,1,2,0,0,0,0,0,1,1],
[0,0,0,0,0,0,0,2,2,1,2,2,0,1,1,0,0,0,0],
[1,1,0,1,0,0,0,2,2,2,2,2,0,0,0,0,1,1,0],
[0,0,0,1,0,1,1,1,0,1,1,0,1,0,1,0,1,0,0],
[0,1,1,1,0,1,0,0,0,0,1,0,1,0,0,0,0,0,0],
[0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,0,1,0],
[0,0,1,1,0,1,1,0,0,0,1,0,0,0,0,0,0,1,0],
[0,0,1,0,0,1,0,1,0,1,1,1,0,1,1,0,0,1,0],
[0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0]
]
map2RallyPoints=[(4,10),(4,7),(8,7),(8,10)]
map2 = (map2Grid,map2RallyPoints)
# map models are stored within objects
class mapGrid (object):
def __init__ (self, grid,rallyPoints):
self.grid = grid
self.rallyPoints = rallyPoints