-
Notifications
You must be signed in to change notification settings - Fork 3
/
jumps.txt
97 lines (59 loc) · 1.18 KB
/
jumps.txt
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
TIME FROGGER
1.
N x M tile world
32 x 32 pixel tiles
2.
every tile has a thing.
3.
things
nothing, floor
man, monster, turtal (annihilation)
4.
given a man(ly) action, can compute
next state: new nxm grid with things.
(also comes with list of manly actions)
5. show the user a preview of all of the next states resulting
from manly actions
(user chooses)
6.
now we are in next state.
GOTO 4
(4 blown up)
man not on thing
...
if nothing solid below, can only fall.
if nothing solid left, can
enumerating!
ooo
ooooo
ooooooo
oooxooo
ooooooo
ooooo
ooo
ooo
ooooo
ooooooo
oooxooo
ooooooo
ooooo
ooo
what is a jump?
This is how the world is indexed:
(0,0) (1,0) (2,0) ...
(0,1) (1,1) (2,1) ...
etc
so jumping up is a negative y displacement.
a final displacement, and a list of tiles on the way there.
data jump =
{ dest : (int, int),
path : (int, int) list
}
upone = jmp (0, -1) []
uptwo = jmp (0,-2) [(0,-1)]
upthree = jmp (0,-3) [(0,-1), (0,-2)]
rightupone = jmp (1,-1) [(0,-1)]
rightuptwo = jmp (1,-2) [(0,-1), (0,-2)]
rightupthree = jmp (1,-3) [(0,-1), (0,-2), (0,-3)]
overtwo = jmp (2,0) [(1,0)]
overthree = jmp (3,0) [(1,0), (2,0)]