This is a GUI game using C++ and SDL2, to allow the user to play the Monty Hall problem repeatedly and view their cumulative stats. There are three doors. One of them is the "winner" while the other two are duds.
- Prompt user to pick a door.
- User picks one door.
- We open a "dud" from among the other two doors, to show that it's a dud.
- Then user is prompted to either switch with the other unopened door, or hold onto their current selection.
- Finally we display the results. Is the user's selection the "winner" or a "dud" ? We also display cumulative results, because the whole point is to see whether switching or holding is statistically advantageous.
We're using C++ 20, importing an .ixx module.
SDL2 (main library)
SDL2_image_ (for images)
SDL2_ttf_ (for fonts)
Phase 1 (choose a door)
Phase 2 (switch doors or hold current selection)
Phase 1 (results)