How react-puzzle-games/react-memory-puzzle works
Memory Puzzle is a browser-based matching game: the app creates a shuffled set of paired tiles, presents them for flipping, tracks moves and matching state, and announces a win with a play-again action. The main runtime is the React entry point and App state owner, supported by tile-generation logic and UI components. The README documents the matching-game goal; relationships below are based on the provided excerpts and SOURCE INDEX, so unsampled behavior is not inferred.
Main entry points: App.js Game State · tile-factory.js Tile Factory · GameStats.js Win Status · game-states.js Game States
Components 14
App Runtime
- React Entry
src/index.js - Game State
src/App.js
Game Logic
- Game States
src/game-states.js - Tile Factory
src/tile-factory.js - Logo Catalog
src/logos.js - Random Subarray
src/random-subarray.js
Game Interface
- Game Header
src/AppHeader.js - Win Status
src/GameStats.js - Play Again
src/RestartButton.js - Game Footer
src/Footer.js - GitHub Icon
src/GitHubIcon.js
Other components
- Player
Connections 16
- React Entry → Game State: renders
src/index.js - Player → Game Header: chooses game
- Player → Flip Tile: flips tiles
- Game State → Game Header: renders controls
src/App.js - Game State → Win Status: renders status
src/App.js - Game State → Tile Grid: renders board
src/App.js - Game State → Game Footer: renders footer
src/App.js - Game State → Tile Factory: creates games
src/App.js - Game State → Game States: checks states
src/App.js - Tile Factory → Logo Catalog: selects logos
src/tile-factory.js - Tile Factory → Random Subarray: shuffles pairs
src/tile-factory.js - Tile Factory → Game States: sets initial state
src/tile-factory.js - Tile Grid → Flip Tile: renders tiles
src/TileGrid.js - Win Status → Game States: checks win state
src/GameStats.js - Win Status → Play Again: renders action
src/GameStats.js - Game Footer → GitHub Icon: renders icon
src/Footer.js