forked from PhilippvK/playforia-minigolf
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGameState.java
More file actions
48 lines (37 loc) · 1.28 KB
/
GameState.java
File metadata and controls
48 lines (37 loc) · 1.28 KB
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
package agolf.game;
import agolf.Seed;
import agolf.SynchronizedBool;
import java.util.List;
public class GameState {
// Constants
private static final double MAGIC_OFFSET = Math.sqrt(2.0) / 2.0;
private static final int DIAG_OFFSET = (int) (6.0 * MAGIC_OFFSET + 0.5);
private static final int[] FRAME_TIME_HISTORY = new int[] {Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE};
// Game state variables
public int playerCount;
public int onShoreSetting;
public int collisionMode;
public int currentPlayerId;
public int isValidPlayerId;
public int gameState;
public double startPositionX;
public double startPositionY;
public double bounciness;
public double somethingSpeedThing;
public double[] resetPositionX;
public double[] resetPositionY;
public List<double[]>[] teleportStarts;
public List<double[]>[] teleportExits;
public short[][][] magnetMap;
public double[] playerX;
public double[] playerY;
public double[] speedX;
public double[] speedY;
public boolean[] simulatePlayer;
public SynchronizedBool[] onHoleSync;
public boolean isLocalPlayer;
public boolean[] playerActive;
public Seed seed;
public int maxPhysicsIterations;
public boolean strokeInterrupted;
}