Skip to content

Commit f3af103

Browse files
committed
Exposed setFailOnError through BWTA interface
1 parent 835e69f commit f3af103

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/main/java/bwem/BWMap.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public void assignStartingLocationsToSuitableBases() {
9191
}
9292

9393
if (atLeastOneFailed) {
94-
//asserter.throwIllegalStateException("At least one starting location was not assigned to a base.");
94+
asserter.throwIllegalStateException("At least one starting location was not assigned to a base.");
9595
}
9696
}
9797

src/main/java/bwta/BWTA.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
import bwem.ChokePoint;
1010

1111
import bwem.Area;
12+
13+
import java.io.OutputStream;
1214
import java.util.*;
1315
import java.util.stream.Collectors;
1416

@@ -26,6 +28,14 @@ public static void readMap(final Game game) {
2628
bwem = new BWEM(game);
2729
}
2830

31+
public static void setFailOnError(final boolean value) {
32+
bwem.setFailOnError(value);
33+
}
34+
35+
public static void setFailOnErrorStream(OutputStream stream) {
36+
bwem.setFailOutputStream(stream);
37+
}
38+
2939
public static void analyze() {
3040
bwem.initialize();
3141

0 commit comments

Comments
 (0)