Expo React Native Whac-A-Mole game.
This project follows a design-first approach. Gameplay behavior is driven by reducer-managed state, UI updates flow from state changes, and side effects stay outside the reducer.
The app is organized around three main areas:
- game domain logic for state transitions, spawning, scoring, and configuration
- UI components for board, holes, HUD, and screens
- services for side effects such as persistence
The design documents in design/ describe the intended architecture, data flow, and project structure.
Key source areas:
src/screens/: route-level compositionsrc/components/game/: game-specific presentation componentssrc/game/: core game domain logicsrc/services/: persistence and other side-effect utilitiessrc/utils/: shared helpers
The game uses a unidirectional flow:
- user interacts with the UI
- an action is dispatched
- the reducer updates state
- the UI re-renders from state
- side effects run separately when needed
This keeps gameplay predictable and testable.
The board shape is defined in game config with explicit rows and columns. Presentation components render the board from that config so layout and state stay aligned.
See:
design/architecture.mddesign/state-machine.mddesign/data-flow.mddesign/folder-structure.mddesign/design-patterns.md
Install dependencies:
npm installRun the app:
npm startRun tests:
npm test