Skip to content

Necro-Rohan/Monty-Hall-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Monty Hall Game 🎭

Introduction

The Monty Hall Game is a fun and interactive simulation of the famous probability puzzle. Built using React.js, this game allows players to experience the counterintuitive nature of probability in the classic "Three Doors" scenario.

How to Play 🕹️

  1. Choose one of the three doors 🚪.
  2. The host will reveal a goat 🐐 behind one of the other two doors.
  3. Decide whether to stick with your original choice or switch to the remaining closed door.
  4. The door is revealed! If it hides the car 🚗, you win!

Features ✨

  • Interactive UI with animated door flipping.
  • Option to switch or stick with the original choice.
  • Tracks the number of wins and losses.
  • Displays all doors at the end of the game.
  • Responsive design for desktop and mobile.

Learning Outcomes 📚

This project helps students understand:

  • The Monty Hall problem and probability.
  • How to manage state in React.
  • Using event handlers for interactivity.
  • Basic CSS animations for UI effects.

Future Improvements 🚀

  • Add game statistics and a win-rate tracker.
  • Implement sound effects and animations.
  • Deploy the game online.

Contributing 🤝

Pull requests are welcome! If you find bugs or have ideas for improvements, feel free to open an issue.


📌 Star this repo ⭐ if you like it! Happy coding! 🚀

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors