Scopa agli 11 all'oratorio, e il tressette rivisto dopo la revisione critica di Codex

Scopa: toscane o napoletane (mattoni o denari), presa obbligatoria, la carta uguale prima delle somme, scelta fra più prese toccando la tavola, coi pulsanti o con frecce e Invio; scope (non all'ultima carta), carte, mattoni, settebello, primiera; tre livelli tarati (92, 64, 52%); test e prova nel browser.
Tressette: fuori ai 21 presa per presa, vittoria subito definitiva (Esc non la cancella più), accuse dette al proprio turno e col seme che manca del tris, striscio e busso meno rigidi, il socio risponde al busso, tiene il 3 e il 2, non esce d'Asso scoperto, legge il volo; tastiera col fuoco sulla carta scelta, tavola descritta a parole, riepilogo che aspetta Andrea. Stesso Esc corretto anche nella scopa.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A1dxvtsZx8NE9fwjXUNDBr
This commit is contained in:
2026-10-26 15:59:10 +01:00
co-authored by Claude Opus 5.5
parent e8152563d8
commit 30e324d7e2
25 changed files with 924 additions and 94 deletions
+8 -1
View File
@@ -28,13 +28,20 @@ async function playCard(page, mode, index, signal) {
const { handX, CARD } = await import('/src/engine/tressette-render.js');
return [handX(game.closeup.hands[0].length, i) + 21, CARD.y + 30];
}, index);
// Sul telefono i pulsanti stanno sotto il tavolo: dopo averli toccati la pagina può essere scesa.
await page.locator('#scene').scrollIntoViewIfNeeded();
const r = await page.locator('#scene').boundingBox(), x = r.x + at[0] / 640 * r.width, y = r.y + at[1] / 360 * r.height;
if (mode === 'touch') await page.touchscreen.tap(x, y); else await page.mouse.click(x, y);
}
async function wait(page) {
return page.evaluate(async () => {
const { canPlay } = await import('/src/engine/tressette.js');
for (let i = 0; i < 12 && !canPlay(game.closeup) && !['smazzata', 'result'].includes(game.closeup.step); i++) game.update(1.3);
// Un tocco mentre qualcuno parla salta la battuta, non gioca: la battuta si salta qui.
for (let i = 0; i < 60; i++) {
if (game.speech) game.skip();
else if (canPlay(game.closeup) || ['smazzata', 'result'].includes(game.closeup.step)) break;
else game.update(1.3);
}
return game.closeup.step;
});
}