-
Notifications
You must be signed in to change notification settings - Fork 2
/
GameEventFrame.pde
40 lines (32 loc) · 1.15 KB
/
GameEventFrame.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
public class GameEventFrame {
private int moment;
private float gameClock;
private float shotClock;
private float[] ball; // x, y, height
private PlayerPosition[] homePlayers;
private PlayerPosition[] visitorPlayers;
public GameEventFrame(int moment, float gameClock, float shotClock,
float[] ball, PlayerPosition[] homePlayers, PlayerPosition[] visitorPlayers) {
this.moment = moment;
this.gameClock = gameClock;
this.shotClock = shotClock;
this.ball = new float[] {ball[0], ball[1], ball[2]};
this.homePlayers = new PlayerPosition[]{homePlayers[0], homePlayers[1], homePlayers[2], homePlayers[3], homePlayers[4]};
this.visitorPlayers = new PlayerPosition[]{visitorPlayers[0], visitorPlayers[1], visitorPlayers[2], visitorPlayers[3], visitorPlayers[4]};
}
public float getGameClock() {
return this.gameClock;
}
public float getShotClock() {
return this.shotClock;
}
public PlayerPosition[] getHomeTeam() {
return this.homePlayers;
}
public PlayerPosition[] getVisitorTeam() {
return this.visitorPlayers;
}
public float[] getBall() {
return this.ball;
}
}