A golfplayer is playing a round of golf with handicap, lets say 27,4. If the player is playing to his handicap he makes 36 points. If he makes more than 36 he should be regulated to a new handicap. But as better he gets the regfulation gets smaller. Let me show an example.
Now the player with his current handicap 27,4 is playing a round where he gets 41 points. This would give him 5 “bonus points” which should get deducted from his current handicap using the data above. this should give him a new handicap 25,2.
Is there anyway I could put this into a formel and automatic calculate the players new handicap?
$points = '41';
$bounuspoints = $points - 36;
if($bonuspoints > 0){
// Some kind of form here //
}
Hopefully some can help me with this tricky problem, and many thanks in advance…
I’m not understanding your concept of ‘points’.
Golf is a game where lower = better. Why is more points = lower handicap? shouldnt it be less points = lower handicap?
Normally, yes, but in this case its something called “Stableford Points”. Here you get 2 points for a “par” according to your handicap, 3 points for a birdie, etc. etc…
The problem is still the same… Cant figure out to make this formula… Please help
Well, might be on the right track, but tested it and it seems like it only deduct 0.5 once, and what it should actually do is deduct 0.5 x 2 and 0.4 x 3. Cant seem to see where it goes wrong?
Well… Still the same. The outcome is 27 and should be 25,2. What about looping through the script 5 times ($bonuspoints) and for each loop get an temperary handicap… Just an idea… Not sure how to though?