-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathuml
169 lines (144 loc) · 2.47 KB
/
uml
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
@startuml
Point <|-- Unit
Unit <|-- Wizard
Unit <|-- Snaffle
Unit <|-- Pole
Unit <|-- Bludger
Spell <|-- Obliviate
Spell <|-- Petrificus
Spell <|-- Accio
Spell <|-- Flipendo
Collision "0..n" -- "1..2" Unit
Spell "1" -- "1" Wizard : caster
Spell "0..n" - "1" Unit : target
Wizard "1" -- "1" Snaffle : carrier
Bludger "1" -- "1" Wizard : last
class Solution {
double energy
int moves1[DEPTH]
int moves2[DEPTH]
int spellTurn1
Unit* spellTarget1
int spell1
int spellTurn2
Unit* spellTarget2
int spell2
Solution* merge(Solution* solution)
void copy(Solution* solution)
void mutate()
void randomize()
}
class Point {
double x
double y
}
class Collision {
double t
int dir
Collision* update(double t, Unit* a, int dir)
Collision* update(double t, Unit* a, Unit* b)
}
class Spell {
int duration
int type
void cast(Unit* target)
void apply()
void save()
void reset()
void reloadTarget()
void effect()
void print()
}
class Obliviate {
void print()
void effect()
}
class Petrificus {
void print()
void effect()
}
class Accio {
void print()
void effect()
}
class Flipendo {
void print()
void effect()
}
class Unit {
int id
int type
int state
bool dead
double r
double m
double f
double vx
double vy
double sx
double sy
double svx
double svy
int grab = 0
void update(int id, int x, int y, int vx, int vy, int state)
double speedTo(Point* p)
double speed()
void thrust(double thrust, Point* p, double distance)
void thrust(double thrust, double x, double y, double distance)
void move(double t)
Collision* collision(double from)
Collision* collision(Unit* u, double from)
void bounce(Unit* u)
void bounce(int dir)
void end()
bool can(Unit* u)
void print()
void save()
void reset()
}
class Pole {
void move()
void save()
void reset()
Collision* collision(double from)
}
class Wizard {
int team
Spell* spells[4]
int spell
Unit* spellTarget
void grabSnaffle(Snaffle* snaffle)
void apply(int move)
void output(int move, int spellTurn, int spell, Unit* target)
void cast(int spell, Unit* target)
Collision* collision(Unit* u, double from)
void bounce(Unit* u)
void play()
void end()
void save()
void reset()
void print()
void updateSnaffle()
void apply(Solution* solution, int turn, int index)
}
class Snaffle {
bool danger;
Collision* collision(double from)
Collision* collision(Unit* u, double from)
void bounce(Unit* u)
void bounce(int dir)
void move(double t)
void end()
void save()
void reset()
void print()
}
class Bludger {
int ignore[2];
void print()
void save()
void reset()
void bounce(Unit* u)
void play()
}
@enduml