Завершить интеграционную устойчивость ботов этапа 3

This commit is contained in:
2026-08-18 18:27:33 +03:00
parent a8d72024f2
commit 9d792bdee4
8 changed files with 156 additions and 44 deletions
@@ -6,6 +6,7 @@ import java.util.List;
/** Runs black-box acceptance scenarios through the same input and state boundary as touch play. */
public final class LevelPlaytestBot {
private static final long DECISION_MILLIS = 16L;
private static final long MIN_WALL_WATCHDOG_MILLIS = 120_000L;
private static final long WALL_WATCHDOG_MULTIPLIER = 10L;
@@ -58,7 +59,11 @@ public final class LevelPlaytestBot {
return snapshot -> {
if (snapshot.deaths() > maximumDeaths) {
throw new AssertionError("Route expected at most " + maximumDeaths
+ " deaths but observed " + snapshot.deaths());
+ " deaths but observed " + snapshot.deaths()
+ "; x=" + snapshot.playerX()
+ ", y=" + snapshot.playerY()
+ ", alive=" + snapshot.playerAlive()
+ ", grounded=" + snapshot.playerOnGround());
}
return completion.reached(snapshot);
};
@@ -196,7 +201,7 @@ public final class LevelPlaytestBot {
}
driver.setInput(step.input.moveLeft, step.input.moveRight, step.input.jump);
driver.waitForNextDecision(32L);
driver.waitForNextDecision(DECISION_MILLIS);
}
driver.setInput(false, false, false);