File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -299,11 +299,15 @@ public boolean simUnit(
299
299
*/
300
300
public interface Behavior {
301
301
302
+ /**
303
+ * Simulate the given agent. Returns true if the agent was active (including waiting),
304
+ * false if the agent won't be able to do anything anymore.
305
+ */
302
306
boolean simUnit (
303
- int frameSkip ,
304
- Agent agent ,
305
- UnorderedCollection <Agent > allies ,
306
- UnorderedCollection <Agent > enemies );
307
+ int frameSkip ,
308
+ Agent agent ,
309
+ UnorderedCollection <Agent > allies ,
310
+ UnorderedCollection <Agent > enemies );
307
311
}
308
312
309
313
public static class IntEvaluation {
Original file line number Diff line number Diff line change @@ -353,4 +353,16 @@ void vsNothingIsFreeWin() {
353
353
// THEN
354
354
assertThat (result ).isGreaterThan (0.9 );
355
355
}
356
+
357
+ @ Test
358
+ void vsHatcheryIsFreeWin () {
359
+ List <Agent > a = Collections .singletonList (factory .of (UnitType .Zerg_Zergling ));
360
+ List <Agent > b = Collections .singletonList (factory .of (UnitType .Zerg_Hatchery ));
361
+
362
+ // WHEN
363
+ double result = evaluator .evaluate (a , b );
364
+
365
+ // THEN
366
+ assertThat (result ).isGreaterThan (0.9 );
367
+ }
356
368
}
You can’t perform that action at this time.
0 commit comments