Стабилизировать проходы пилы уровня 10
This commit is contained in:
@@ -47,6 +47,23 @@ public final class LevelPlaytestBot {
|
||||
boolean reached(GameView.AutomationSnapshot snapshot);
|
||||
}
|
||||
|
||||
public static SnapshotCondition groundedAliveAtOrBeyond(float minimumX) {
|
||||
return snapshot -> snapshot.playerAlive()
|
||||
&& snapshot.playerOnGround()
|
||||
&& snapshot.playerX() >= minimumX;
|
||||
}
|
||||
|
||||
public static SnapshotCondition whileDeathsAtMost(
|
||||
int maximumDeaths, SnapshotCondition completion) {
|
||||
return snapshot -> {
|
||||
if (snapshot.deaths() > maximumDeaths) {
|
||||
throw new AssertionError("Route expected at most " + maximumDeaths
|
||||
+ " deaths but observed " + snapshot.deaths());
|
||||
}
|
||||
return completion.reached(snapshot);
|
||||
};
|
||||
}
|
||||
|
||||
public static final class Scenario {
|
||||
private final int levelNumber;
|
||||
private final String name;
|
||||
|
||||
Reference in New Issue
Block a user