On the Subject of Golf


This module consists of 3 displays, the top for your answer and the bottom two for information about the 9 holes played. Use the arrow buttons at the bottom to change the hole you would like to view. There's also a wind direction in the top-left which can be in one of 16 different directions, a submit button to submit your final score and number buttons to input the score.
Note: There is no backspace button, so be careful.

If you encounter decimals at any point in the calculation, remove them.

The first step is to calculate the number of strokes on every hole, to do so, use the terminology table below to deduce what the number of strokes was by default. Note that every hole on the course has a par of 4. Simply add up all the values for the initial score.

22 45 67 90 112 135 157 180 202 225 247 270 292 315 337 360
Hole in One1 stroke
Eagle2 strokes under Par
Birdie1 stroke under Par
Bogey1 stroke over Par
Double Bogey2 strokes over Par
Triple Bogey3 strokes over Par
+nn strokes

The second step is to calculate the golfer's handicap using the equation below. Note "Wind direction" is referring to the number in the diagram to the right.

(|(Modules on the bomb (including needies) - 9)| × (113 / Wind direction)) modulo 55

To get the final score, take your initial score and add to it the handicap divided by 9. Once that is calculated, submit that number into the module.