How sijan2006/memory-game-react works
This is a React Pokémon memory game. On launch, the entry point mounts the game, which loads 12 Pokémon from PokéAPI and displays their cards. The player selects cards: unique selections increase the score and update the session high score, while repeats reset the current score and selection history. Cards are shuffled after successful selections. The game logic and view are implemented together; styling is separate. The README documents these capabilities, and the sampled game source confirms their implementation.
Main entry points: game.tsx Game component · main.tsx React entry point · App.css Game styling · index.css Base styling
Components 8
Application entry
- React entry point
memory/src/main.tsx
Game runtime
- Game component
memory/src/components/game.tsx - Pokémon loader
memory/src/components/game.tsx - Card shuffler
memory/src/components/game.tsx
Presentation
- Game styling
memory/src/App.css - Base styling
memory/src/index.css
External
- PokéAPI
Other components
- Player
Connections 8
- React entry point → Game component: mounts
memory/src/main.tsx - React entry point → Base styling: imports styles
memory/src/main.tsx - Player → Game component: selects cards
memory/src/components/game.tsx - Game component → Pokémon loader: starts loading
memory/src/components/game.tsx - Pokémon loader → PokéAPI: requests Pokémon
memory/src/components/game.tsx - PokéAPI → Pokémon loader: returns Pokémon data
memory/src/components/game.tsx - Game component → Card shuffler: shuffles cards
memory/src/components/game.tsx - Game component → Game styling: imports styles
memory/src/components/game.tsx