-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathGameType.java
More file actions
43 lines (36 loc) · 873 Bytes
/
GameType.java
File metadata and controls
43 lines (36 loc) · 873 Bytes
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
package bwapi;
import java.util.Arrays;
/**
* An enum that represents game types in Broodwar.
* <p>
* A game type is selected when creating a game.
*/
public enum GameType {
None(0),
Custom(1), // Warcraft III
Melee(2),
Free_For_All(3),
One_on_One(4),
Capture_The_Flag(5),
Greed(6),
Slaughter(7),
Sudden_Death(8),
Ladder(9),
Use_Map_Settings(10),
Team_Melee(11),
Team_Free_For_All(12),
Team_Capture_The_Flag(13),
Unknown_0x0E(14),
Top_vs_Bottom(15),
Iron_Man_Ladder(16), // Warcraft II
Pro_Gamer_League(32), // Not valid
Unknown(33);
static final GameType[] idToEnum = new GameType[33 + 1];
static {
Arrays.stream(GameType.values()).forEach(v -> idToEnum[v.id] = v);
}
public final int id;
GameType(final int id) {
this.id = id;
}
}