GithubHelp home page GithubHelp logo

usga-handicap-calculator's Introduction

Handicap Calculator

App start up

image

Program will allow for handicap index calculation for players based on the number of rounds in the system for that player.

Users can also add additional courses and/or add more players to the list.

Player data and course data is stored in the /bin dir of the project. Everytime a new player is added, it will add that player to the master list, and in order for scores to be calculated, rounds need to be added per player so their scoring list can be generated.

Functionality

USGA Calculation Mehod: "Your Handicap Index is a portable number that represents your demonstrated golfing ability. It is based on your past scores relative to the difficulty of the course and tees played, as well as the playing conditions during each one of those rounds. To calculate your Handicap Index, your 8 best Score Differentials from your most recent 20 scores"

In code:

Calculating player differential based on the course rating and slope

round/differential = (score - courseRating) * 113 / slopeRating;

Calculating handicap index based on the players differential/round list

Math.Round(handicapIndexSum / 8, 1);

To calculate your Handicap Index, your 8 best Score Differentials from your most recent 20 scores are averaged

Each player will need 20 rounds in order for the index to be calculated. Formula is based off of the USGA's handicap index equation.

image

If a player does not meet the 20 round requirement, then a messagebox will display the issue to the user.

image

Once a user reaches 20 rounds, then the index will be automatically calculated once 20 differentials are in the player list.

Less than 20 Rounds:

image

Requirement met at 20 Rounds:

image

About

I used to be an assistant golf pro, and a common issue I ran into with members or existing players was that some did not have a handicap calculated and in order to compete in some tournaments, players must have a handicap index. This allows for a lightweight index calculation if you needed to get an index on the fly. Also, it could be used for golf trips in case money games are played. Some may ask, "well why dont you just use the GHIN system from the USGA?" and to answer that, the GHIN system usually costs money for the membership and more than likely you will need to belong to a country club. This helpe mitigate that to get a true index.

Disclaimer

As of now, the Tee's used for the courses will always be the tips (In the future, I plan to add more tee options to better adjust for handicap), but as of now since this is designed for competition, we will use the back tees for every course upload.

usga-handicap-calculator's People

Contributors

cole-z avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.