How dinael/swdscorepad works
7 Wonders Duel Scorepad is a browser score calculator. Players enter category scores for each player, optionally enable Agora or Pantheon, then calculate a winner or record a military, progress, or political victory; they can reset and replay. The app also provides player tabs, translated UI, and a splash route. The graph follows the sampled entry point and score flow. Some listed views and components were not sampled, so their internal behavior and wiring are omitted.
Main entry points: Scorepad.tsx Scorepad view · App.tsx App shell · Router.tsx Route dispatch · main.tsx React entry
Components 16
Application shell
- React entry
src/main.tsx - App shell
src/App.tsx - Route dispatch
src/router/Router.tsx - Footer
src/components/SWDfooter/SWDfooter.tsx
Scoring workflow
- Scorepad view
src/view/scorepad/Scorepad.tsx - Player tabs
src/components/SWDtabs/SWDtabs.tsx - Player scorepad
src/components/SWDscorepad/SWDscorepad.tsx - Score categories
src/data/inputValues.tsx - Victory actions
src/components/SWDvictories/SWDvictories.tsx
Settings and language
- Game context
src/context/GameContext.tsx - Header settings
src/components/SWDheader/SWDheader.tsx
Views and translations
- Translation setup
src/i18n.ts - Locale messages
src/locales/en.json - Splash view
src/view/splash/Splash.tsx - Error view
src/view/ErrorPage.tsx
Other components
- Player
Connections 20
- Player → React entry: opens app
- React entry → App shell: renders
- React entry → Translation setup: loads translations
- App shell → Game context: provides state
- App shell → Header settings: renders
- App shell → Route dispatch: renders
- App shell → Footer: renders
- Header settings → Game context: toggles expansions
- Header settings → Translation setup: changes language
- Translation setup → Locale messages: loads messages
- Route dispatch → Scorepad view: routes scorepad
- Route dispatch → Splash view: routes splash
- Route dispatch → Error view: routes fallback
- Scorepad view → Game context: reads expansions
- Scorepad view → Player tabs: renders players
- Scorepad view → Player scorepad: renders score entry
- Scorepad view → Victory actions: dispatches victory actions
- Score categories → Player scorepad: supplies categories
- Player scorepad → Scorepad view: reports totals
- Player tabs → Scorepad view: reports active player