Skip to content

maudoo/Guess-The-Flips

Repository files navigation

Guess-The-Flips

This project simulates a coin toss game where the goal is to achieve a specific head streak (between 6 and 12 inclusive). It then iterates the simulation process one thousand times to calculate the average number of flips needed to reach the target. It then asks the user to guess the average number of flips and compares their guess to the actual average, telling them the accuracy of their guess.

Prerequisites

Install Java Development Kit (JDK) 21, options:

  • Amazon Corretto
  • OpenJDK
  • Oracle

Install IDE of choice

  • Spring Tools for Eclipse - free
  • Visual Studio Code - free
  • IntelliJ IDEA - requires license

Gameplay:

  • The program randomly generates a target head streak between 6 and 12.
  • The user guesses the average number of flips needed to reach the target streak.
  • The program simulates the coin toss experiment 1000 times, keeping track of the number of flips in each attempt.
  • It calculates the overall average number of flips across all simulations.
  • It compares the user's guess to the actual average and informs them of their accuracy relative to the average.
  • The user can choose to play again or quit.

Future Possibilities:

  • Adjustable number of simulations.
  • Different target streak settings.
  • User-defined target streak length.
  • Graphical representation of simulation results.

This project combines game elements with statistical analysis, providing an engaging way to explore probability and random outcomes. By expanding its features and functionalities, it can further enhance its educational and entertainment value.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages