-
Notifications
You must be signed in to change notification settings - Fork 1
/
mlgrope.mli
80 lines (65 loc) · 1.08 KB
/
mlgrope.mli
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
open Graphics
open Math2d
type bubble = {
position : vec;
radius : float;
}
type magnet = {
position : vec;
radius : float;
strength : float;
}
type rope = {
position : vec;
radius : float;
length : float;
}
type elastic = {
position : vec;
radius : float;
length : float;
strength : float;
}
type goal = {
position : vec;
}
type star = {
position : vec;
}
type block = {
vertices : vec list;
color : Graphics.color;
}
type spike = {
position : vec;
angle : float;
}
val spike_edge_size : float
type fan = {
position : vec;
size : vec;
angle : float;
strength : float;
}
type ball = {
position : vec;
speed : vec;
links : entity list;
previous_links : entity list;
}
and entity =
| Ball of ball
| Bubble of bubble
| Magnet of magnet
| Rope of rope
| Goal of goal
| Elastic of elastic
| Star of star
| Block of block
| Fan of fan
| Spike of spike
type game_state = entity list
val ball_radius : float
val position_of_entity : entity -> vec
val swap_ball : ball -> ball -> (entity -> entity)
val fold_balls : ('a -> ball -> 'a) -> 'a -> entity list -> 'a