Стабилизировать проходы пилы уровня 10

This commit is contained in:
2026-08-18 17:32:01 +03:00
parent 650bfb3533
commit da3777b4cc
3 changed files with 79 additions and 9 deletions
@@ -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;