File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed
Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change 44import bwapi .Player ;
55import bwapi .Position ;
66import bwapi .TilePosition ;
7+ import bwem .Area ;
78import bwem .BWEM ;
89import bwem .Base ;
910import bwem .ChokePoint ;
1011
11- import bwem . Area ;
12+ import java . io . OutputStream ;
1213import java .util .*;
1314import java .util .stream .Collectors ;
1415
@@ -21,6 +22,26 @@ public class BWTA {
2122 private static List <Chokepoint > chokepoints ;
2223 private static List <BaseLocation > baseLocations ;
2324
25+ /**
26+ * Extension to traditional BWTA interface for JBWAPI
27+ * Exposes BWEM's setFailOnError(boolean) method for aggressively asserting errors.
28+ *
29+ * @param value Whether BWEM should throw an exception on assertion failure.
30+ */
31+ public static void setFailOnError (final boolean value ) {
32+ bwem .setFailOnError (value );
33+ }
34+
35+ /**
36+ * Extension to traditional BWTA interface for JBWAPI
37+ * Exposes BWEM's setFailOnErrorStream(OutputStream) method for specifying error log destination.
38+ *
39+ * @param stream Where to log BWEM errors.
40+ */
41+ public static void setFailOnErrorStream (OutputStream stream ) {
42+ bwem .setFailOutputStream (stream );
43+ }
44+
2445 public static void readMap (final Game game ) {
2546 System .err .println ("WARNING: this BWTA is fake and only translates BWTA calls to their respective BWEM calls. Please use BWEM directly if possible." );
2647 bwem = new BWEM (game );
You can’t perform that action at this time.
0 commit comments