Suoni d'ambiente sintetizzati (vento, acqua, uccelli, grilli, campane) col loro volume in Pausa; la fessura in primo piano: si cerca col fascio della torcia il quadro e gli occhi (lavoro di Codex). La foto del palio leggibile da nginx, e un test che lo controlla per tutti i file serviti

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018ks2K99uqCZjAxvy7Rdj1R
This commit is contained in:
2026-10-25 18:17:01 +01:00
co-authored by Claude Opus 5.5
parent 1fabb6e543
commit de303c5825
22 changed files with 732 additions and 61 deletions
+13 -2
View File
@@ -1,5 +1,5 @@
// Fa avanzare il gioco come farebbe un giocatore impaziente: tempo che scorre e battute saltate.
export function settle(game, { maxSteps = 20000 } = {}) {
export function settle(game, { maxSteps = 20000, explore = false } = {}) {
const said = [];
for (let i = 0; i < maxSteps; i++) {
if (game.speech) {
@@ -7,7 +7,10 @@ export function settle(game, { maxSteps = 20000 } = {}) {
game.skip();
}
// Un primo piano aperto aspetta il giocatore (sfogliare, chiudere): qui ci si ferma e decide il test.
if (game.closeup && !game.speech && game.reach <= 0) return said;
if (game.closeup && !game.speech && game.reach <= 0) {
if (!explore || game.story.closeups[game.closeup.id].type !== 'torch') return said;
exploreTorch(game);
}
// Un ultimo fotogramma, come nel gioco vero: a sequenza finita il motore prende il punto fermo e salva.
if (!game.busy && !game.walking && !game.queue.length && !game.task) { game.update(0); return said; }
game.update(0.05);
@@ -15,6 +18,14 @@ export function settle(game, { maxSteps = 20000 } = {}) {
throw new Error('Il gioco non si ferma: ' + JSON.stringify(game.snapshot()));
}
// Il collaudo della soluzione compie anche i gesti richiesti dal finale interattivo.
export function exploreTorch(game) {
const c = game.closeup, def = c && game.story.closeups[c.id];
if (def?.type !== 'torch') return;
if (c.step === 'done') game.closeupClose();
else if (c.step === 'search') game.closeupAim(def.targets[c.found].at);
}
export function memoryStorage() {
return { data: {}, getItem(k) { return this.data[k] ?? null; }, setItem(k, v) { this.data[k] = String(v); }, removeItem(k) { delete this.data[k]; } };
}