diff --git a/README.md b/README.md index be5dd52..d549a20 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,12 @@ Play: [https://tiennm99.github.io/sokoban/](https://tiennm99.github.io/sokoban/) ## Features - **All 155 puzzles** from the Microban set, from beginner teasers up to the giant "Take the long way home" maze and "The Dungeon" finale. - **Paginated level select** with progress tracking and best-move record per level. -- **Controls**: arrow keys or WASD. `U` / `Z` to undo, `R` to restart, `Esc` for menu. +- **Controls**: Arrow keys or WASD on desktop; on-screen D-pad on mobile (bottom-right, one-handed). `U` / `Z` to undo, `R` to restart, `Esc` for menu. +- **Mobile-optimized**: Touch-safe controls, haptic feedback (vibrate on push & win), safe-area insets for notches/nav bars, browser gesture blocking. +- **Installable PWA**: Add to home screen on iOS/Android, play offline, standalone fullscreen mode. - **Undo history**, live move counter, animated moves. -- **Progress saved** locally in `localStorage`. -- **Responsive tile sizing** so small and large levels both look right. +- **Progress saved** locally in `localStorage`, syncs across all devices you use. +- **Responsive tile sizing** so small and large levels both look right on any screen. ## Development diff --git a/docs/codebase-summary.md b/docs/codebase-summary.md index d55fcbf..55ddc87 100644 --- a/docs/codebase-summary.md +++ b/docs/codebase-summary.md @@ -10,14 +10,16 @@ src/ │ ├── core/ │ │ ├── level-parser.js # XSB text → {walls, targets, boxes, player, floors} │ │ ├── board-model.js # Pure game state + move/undo/win logic -│ │ └── progress-store.js # localStorage persistence (completed + best moves) +│ │ ├── progress-store.js # localStorage persistence (completed + best moves) +│ │ └── haptics.js # navigator.vibrate wrapper (10ms on box push, 60ms on win) │ └── data/ │ └── microban-levels.js # 155 XSB level strings (Microban, D. W. Skinner) └── views/ ├── MenuView.svelte # Title, play, progress, hints ├── LevelSelectView.svelte # Paginated 5×4 grid (20/page × 8 pages) - ├── GameView.svelte # Board + HUD + win overlay + input - ├── Board.svelte # Presentational DOM board (div-per-tile) + ├── GameView.svelte # Board + HUD + win overlay + input + haptics + ├── Board.svelte # Presentational DOM board (div-per-tile, touch-action: none) + ├── MobileControls.svelte # On-screen D-pad + action stack (hidden on desktop) └── AppButton.svelte # Shared themed button (wraps native