How mhdsahil1/who_knows works
Who Knows! is a local, pass-and-play social deduction game: one group configures a game, privately passes a device for role reveals, discusses face-to-face, votes, and sees the result. The graph preserves the documented Classic and One-Shot flows, configurable Imposters, Chaos Mode, Final Guess, built-in and custom words, and Associated Words. Paths for screens and managers are supported by the tree; detailed call wiring was not sampled, so the graph uses documented workflow links and avoids asserting internal calls between game helpers.
Main entry points: vote_result_screen.dart Vote results · role_reveal_screen.dart Role reveal · voting_screen.dart Voting · category_selection_screen.dart Word selection
Components 26
Game experience
- App entry
lib/main.dart - App shell
lib/app.dart - Home
lib/screens/home_screen.dart - Player setup
lib/screens/player_setup_screen.dart - Mode setup
lib/screens/game_mode_screen.dart - Game configuration
lib/screens/game_config_screen.dart - Ready screen
lib/screens/ready_screen.dart - Role reveal
lib/screens/role_reveal_screen.dart - Discussion
lib/screens/discussion_screen.dart - Voting
lib/screens/voting_screen.dart - Vote results
lib/screens/vote_result_screen.dart - Final guess
lib/screens/final_guess_screen.dart - Game result
lib/screens/game_over_screen.dart
Game rules
- Game engine
lib/game/game_engine.dart - Role assignment
lib/game/role_manager.dart - Vote rules
lib/game/vote_manager.dart - Win conditions
lib/game/win_condition.dart
Word systems
- Word selection
lib/screens/category_selection_screen.dart - Word selection logic
lib/game/word_manager.dart - Built-in words
lib/data/word_database.dart - Custom words
lib/screens/my_words_screen.dart - Associated Words
lib/screens/associated_words_screen.dart - Association service
lib/services/associated_words_service.dart
Local data
- Custom word service
lib/services/my_words_service.dart - Local storage
lib/services/storage_service.dart
Other components
- Player group
Connections 24
- Player group → App entry: launches
- App entry → App shell: starts
- App shell → Home: opens
- Home → Player setup: starts game
- Player setup → Mode setup: continues setup
- Mode setup → Game configuration: selects mode
- Game configuration → Word selection: sets options
- Word selection → Ready screen: confirms words
- Ready screen → Role reveal: begins round
- Role reveal → Discussion: reveals roles
- Discussion → Voting: opens vote
- Voting → Vote results: submits vote
- Vote results → Win conditions: checks outcome
- Vote results → Final guess: caught Imposter
- Final guess → Win conditions: checks guess
- Win conditions → Game result: determines result
- Vote results → Ready screen: starts next round
- Role reveal → Role assignment: role assignment stage
- Voting → Vote rules: vote stage
- Word selection → Word selection logic: chooses words
- Word selection logic → Built-in words: reads categories
- Custom words → Custom word service: manages words
- Custom word service → Local storage: persists locally
- Associated Words → Association service: requests associations