forked from JavaBWAPI/JBWAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlayerSelf.java
More file actions
18 lines (14 loc) · 729 Bytes
/
Copy pathPlayerSelf.java
File metadata and controls
18 lines (14 loc) · 729 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package bwapi;
import java.util.stream.IntStream;
class PlayerSelf {
final IntegerCache minerals = new IntegerCache();
final IntegerCache gas = new IntegerCache();
final IntegerCache[] supplyUsed = new IntegerCache[3];
final BooleanCache[] isResearching = new BooleanCache[TechType.idToEnum.length];
final BooleanCache[] isUpgrading = new BooleanCache[UpgradeType.idToEnum.length];
PlayerSelf() {
IntStream.range(0, supplyUsed.length).forEach(i -> supplyUsed[i] = new IntegerCache());
IntStream.range(0, isResearching.length).forEach(i -> isResearching[i] = new BooleanCache());
IntStream.range(0, isUpgrading.length).forEach(i -> isUpgrading[i] = new BooleanCache());
}
}