Classic Italian card game Scopa. Play like the Finuccis.
Facciamo un'altra partita! Dai! Ma bravo!
The HTML5 app under javascript/html5/src is configured as a PWA with:
- install support via
manifest.json - standalone display mode
- service worker registration in
index.js - offline caching for code, styles, worker scripts, and card/image assets
- Open the online app link above in a modern browser.
- Use the browser install action for your platform. Chrome/Edge desktop: Install icon in address bar. Android Chrome: Add to Home screen / Install app. iOS Safari: Share -> Add to Home Screen.
- Start the installed app once while online to ensure caches are primed.
- App shell files (
index.html,index.js, CSS, JS modules, manifest) are pre-cached. - Card assets for both decks are pre-cached:
carte_merkelmazzo_spagnolo
- Runtime requests are cached with stale-while-revalidate for scripts/styles/images/fonts/workers.
- Navigations use network-first with cached fallback to the app shell when offline.
If updates do not appear immediately or offline behavior looks stale:
- Close all open app tabs/windows.
- Reopen the app once while online.
- Do a hard refresh. Windows/Linux: Ctrl+F5 (or Ctrl+Shift+R). macOS: Cmd+Shift+R.
- If needed, clear site data for the app origin (cache + service workers), then reload.
For local development/service-worker testing:
- Prefer testing over
http://localhost(service workers are not available on plainfile://). - After changing
sw.js, refresh once online so the new worker can install and activate.
Top-level layout:
doc/— project documentation (rules, requirements, architecture)img/— source/generator material for card decks and mediajavascript/html5/— web implementation (Vite + Vitest)
HTML5 app layout (javascript/html5/src):
index.html— app shell and overlay pagesindex.js— app entry point, wiring, service worker registrationmanifest.json— PWA manifestsw.js— service worker (offline caching and fetch strategies)ai/— AI strategies (greedy, negamax, mcts, evaluation helpers)config/— configuration and constantscore/— game rules/engine/domain logicui/— view, controller, and componentscss/— stylingimg/— runtime assets (icons, deck faces/backs)persistence/— save/load handlingutils/— shared utilitiesworkers/— web worker entry pointstest/— Vitest suites