Run demo
Run locally: cd projects/game-2048 && pnpm install && pnpm sigil:compile && pnpm dev
Sigil 2048
This project uses the same source-first browser pattern as the other curated Sigil demos:
src/game2048.lib.sigilowns the move, merge, score, and status rulestests/game2048.sigilchecks the core board transitions in Sigilweb/src/generated/game-2048.tsis generated for the browser appweb/src/bridge.tsxowns keyboard/buttons, random tile spawning, and rendering
Current status:
- browser-runnable demo published under
/projects/sigil-2048/demo/ - classic
4x42048 board with keyboard and on-screen controls - score, restart, win, and lose states
- random tile spawning stays in the browser bridge while Sigil owns deterministic move logic
Run
cd projects/game-2048
pnpm install
pnpm dev
cargo run -q -p sigil-cli --manifest-path ../../language/compiler/Cargo.toml -- test tests
pnpm dev regenerates web/src/generated/game-2048.ts before starting Vite.
Build the website demo bundle
cd projects/game-2048
pnpm install
SIGIL_2048_BASE=/projects/sigil-2048/demo/ pnpm build