This little Node.js application brings the Monty Hall problem to your shell as an interactive game; retro swag is provided by emoji and ANSI colors. You can play as many rounds of the game as you like and check the statistics at any time.
git clone https://github.com/stefan-girlich/node-monty-hall-problem
cd node-monty-hall-problem
npm install
npm test # execute all unit tests
npm start # start the actual game
- Simply follow the on-screen instructions.
- For each prompt, type one of the given options and confirm by pressing Enter.
- At any prompt, enter ? to view the current statistics.
- To leave the application, simply terminate it by pressing Ctrl+C or Cmd+C.
The configuration can be changed in the file config.json. It contains the following top-level sections:
- breakDuration How long should the game be paused between rounds? (seconds)
Configuration for the actual game logic.
- doorCount How many doors should be in the game? (min. 3)
Emoji to be used to represent game objects.
On-screen texts.
Mapping of user input to multiple-choice answers in the command line prompt.
Thanks to Hsin Yu for inspiring me to write this little application :)