Skip to content

Supposeduck30/tennis-match-simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tennis Match Simulator

A fully functional webpage that uses HTML, CSS, and Javascript to simulate reaslistic tennis match outcomes

This project is easy to use and was built with no external libraries. The simulator:

  • Inputs player names and rankings
  • Simulates matches using realistic probability
  • Simulates a coin toss to decide who serves first, and then alternates serves every game
  • Is deployed via github static pages

🕓 Version History

1.0.0

- Green white and blue color scheme

- Simulated it off of ranking and who is serving

- Outputs the score of each game

💻 How to run locally

If you want to use the website normally, just use the link (https://supposeduck30.github.io/tennis-match-simulator/). If you want to run it locally, here are the steps:

1. Clone the repo

2. Open the directory and double click "index.html"

3. It will run in your browser

🔧 How to tweak/contribute

1. Fork the repo

2. Clone your fork

3. Make your changes and commit and push them

4. Create a pull request (OPTIONAL, ONLY IF YOU WANT TO CONTRIBUTE)

🧠 How it works

1. The user inputs rankings for the player

2. A coin toss decides who serves first

3. Each game is influenced by a serve hold probability of the server (Higher rank means higher probability to win service game)

4. This is then simulated game by game

5. If it is 6-6, a tiebreak is simulated

⚠️ Known issues

- This website is not tied to real ATP/WTA results, it is just based off of numerical input

- Results reset if refreshed, nothing saves

Upcoming features

  • Grand slam support

⚖️ LICENSE

MIT LICENSE

About

Website that simulates tennis matches based on ATP rankings.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published