-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathCoordinateType.java
More file actions
37 lines (31 loc) · 867 Bytes
/
CoordinateType.java
File metadata and controls
37 lines (31 loc) · 867 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
package bwapi;
import java.util.Arrays;
/**
* The coordinate type enumeration for relative drawing positions.
*/
public enum CoordinateType {
/**
* A default value for uninitialized coordinate types.
*/
None(0),
/**
* {@link Position#Origin} (0,0) corresponds to the top left corner of the <b>screen</b>
*/
Screen(1),
/**
* {@link Position#Origin} (0,0) corresponds to the top left corner of the <b>map</b>
*/
Map(2),
/**
* {@link Position#Origin} (0,0) corresponds to the top left corner of the <b>mouse cursor</b>
*/
Mouse(3);
static final CoordinateType[] idToEnum = new CoordinateType[4];
static {
Arrays.stream(CoordinateType.values()).forEach(v -> idToEnum[v.id] = v);
}
public final int id;
CoordinateType(final int id) {
this.id = id;
}
}