-
Notifications
You must be signed in to change notification settings - Fork 0
/
DynamicContext.pde
50 lines (45 loc) · 1.01 KB
/
DynamicContext.pde
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
class DynamicException extends RuntimeException {
DynamicException(String msg) {
super(msg);
}
}
class DynamicError {
final String msg;
final int begin;
final int end;
DynamicError(String msg, int begin, int end) {
this.msg = msg;
this.begin = begin;
this.end = end;
}
}
class DynamicContext {
final int frameCount;
List<BallConfig> ballStack;
List<Integer> countStack;
List<BallConfig> balls;
boolean playSound;
List<String> debugs;
List<DynamicError> errors;
DynamicContext (int frameCount) {
this.frameCount = frameCount;
this.ballStack = new ArrayList();
this.ballStack.add(
new BallConfig(
new PVector(0, 0, 0),
new PVector(100, 0, 0),
new PVector(0, 0, 0),
new Color(1, 1, 1, 1),
new Color(0, 0, 0, 0),
10,
0,
10
)
);
this.countStack = new ArrayList();
this.balls = new ArrayList();
this.playSound = false;
this.debugs = new ArrayList();
this.errors = new ArrayList();
}
}