Only knew how to add a click event listener to canvas. So had to make the game with only one button which is clicking the canvas. Also used vanilla Javascript
Golfball starts at a point, and then randomly moves on a diagnol line towards the hole. There are 2 players. If the ball gets close to the hole before 5 strokes, turn for player ends and records score for player 1 aka birdie par etc then player 2 goes. If stroke reaches 5, ball automatically goes to hole in other words max amount of strokes is 5 a par. After player 2 turn, compare player 1 and player 2 score and see who won. Record Wins and Losses and Ties.