File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 88import bwta .BWTA ;
99import bwta .BaseLocation ;
1010
11- public class TestBot1 extends DefaultBWListener {
11+ public class MarineHell extends DefaultBWListener {
1212
13- private Mirror mirror = new Mirror ( );
13+ private BWClient mirror = new BWClient ( this );
1414
1515 private Game game ;
1616
@@ -38,7 +38,6 @@ private enum Strategy {
3838 private Set <Position > enemyBuildingMemory = new HashSet <>();
3939
4040 public void run () {
41- mirror .getModule ().setEventListener (this );
4241 mirror .startGame ();
4342 }
4443
@@ -67,7 +66,7 @@ public void onStart() {
6766 // Use BWTA to analyze map
6867 // This may take a few minutes if the map is processed first time!
6968
70- BWTA .readMap ();
69+ BWTA .readMap (game );
7170 BWTA .analyze ();
7271
7372 int i = 0 ;
@@ -344,7 +343,7 @@ public void onFrame() {
344343 searchingScv ++;
345344 }
346345
347- debugText = "Size: " + workers .size () + "; isGathering" + workers .get (7 ).isGatheringMinerals () + "; location: "
346+ debugText = "Size: " + workers .size () + "; isGathering" + workers .get (workers . size () > 7 ? 7 : workers . size () - 1 ).isGatheringMinerals () + "; location: "
348347 + baseLocations .size () + "; num: " + searchingScv ;
349348
350349 for (Unit u : game .enemy ().getUnits ()) {
@@ -391,7 +390,7 @@ public void onFrame() {
391390 }
392391
393392 public static void main (String [] args ) {
394- new TestBot1 ().run ();
393+ new MarineHell ().run ();
395394 }
396395
397396 // Returns a suitable TilePosition to build a given building type near
You can’t perform that action at this time.
0 commit comments