Skip to content

Commit 7c1a359

Browse files
author
Bytekeeper
committed
Slight improvement of bwmirror's agent factory
1 parent 9d447ee commit 7c1a359

File tree

1 file changed

+9
-20
lines changed

1 file changed

+9
-20
lines changed

src/main/java/org/bk/ass/BWMirrorAgentFactory.java

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,14 @@
11
package org.bk.ass;
22

3-
import static java.lang.Math.max;
4-
import static java.util.Arrays.asList;
3+
import bwapi.*;
4+
import org.bk.ass.info.BWMirrorUnitInfo;
55

6-
import bwapi.ExplosionType;
7-
import bwapi.Game;
8-
import bwapi.Player;
9-
import bwapi.Race;
10-
import bwapi.TechType;
11-
import bwapi.Unit;
12-
import bwapi.UnitSizeType;
13-
import bwapi.UnitType;
14-
import bwapi.UpgradeType;
15-
import bwapi.WeaponType;
166
import java.util.Collection;
17-
import java.util.HashSet;
7+
import java.util.EnumSet;
188
import java.util.Set;
199
import java.util.function.Consumer;
20-
import org.bk.ass.info.BWMirrorUnitInfo;
10+
11+
import static java.lang.Math.max;
2112

2213
/**
2314
* Be aware that for fogged units, BWMirror returns invalid coordinates. You'll have to adjust for
@@ -26,17 +17,15 @@
2617
public class BWMirrorAgentFactory {
2718

2819
private static final Set<UnitType> SUICIDERS =
29-
new HashSet<>(
30-
asList(
20+
EnumSet.of(
3121
UnitType.Zerg_Scourge,
3222
UnitType.Zerg_Infested_Terran,
3323
UnitType.Terran_Vulture_Spider_Mine,
34-
UnitType.Protoss_Scarab));
24+
UnitType.Protoss_Scarab);
3525
private static final Set<UnitType> KITERS =
36-
new HashSet<>(
37-
asList(
26+
EnumSet.of(
3827
UnitType.Terran_Marine, UnitType.Terran_Vulture,
39-
UnitType.Zerg_Mutalisk, UnitType.Protoss_Dragoon));
28+
UnitType.Zerg_Mutalisk, UnitType.Protoss_Dragoon);
4029

4130
private Consumer<Collection<Agent>> bunkerReplacer =
4231
agents -> {

0 commit comments

Comments
 (0)