How momenabdelhady16/choice-or-chance works
Choose Your Story is a small browser-based randomized quiz. The player answers a sequence of everyday questions through confirm dialogs; each answer receives a randomized outcome in an alert. The game removes asked questions, tracks bad outcomes, and ends when questions run out or three mistakes occur. The runtime is implemented in one file, so nodes represent responsibilities within that file rather than separate modules.
Main entry points: main.js Quiz state
Components 8
Other components
- Player
- Game start
main.js - Quiz state
main.js - Question pool
main.js - Random choice
main.js - Answer dialog
- Outcome dialog
- Game endings
main.js
Connections 11
- Game start → Quiz state: starts
main.js - Quiz state → Question pool: selects and removes
main.js - Quiz state → Random choice: chooses question
main.js - Random choice → Quiz state: returns index
main.js - Quiz state → Answer dialog: asks question
main.js - Player → Answer dialog: answers
README.MD - Quiz state → Random choice: chooses outcome
main.js - Quiz state → Outcome dialog: shows result
main.js - Outcome dialog → Player: reveals outcome
README.MD - Quiz state → Game endings: ends on condition
main.js - Quiz state → Quiz state: recurses
main.js