© Mark Cunningham 2020
M. CunninghamGame Programming with Code Angelhttps://doi.org/10.1007/978-1-4842-5305-2_15

15. Golf part 3: It’s in the hole

Mark Cunningham1 
(1)
Edinburgh, Scotland
 

‘Incredible scenes here as Tommy Miller’s putt comes up short by what can only be an inch. And so now Mitch Johnson has this 18-foot putt for the Open Championship. Over to you, Jim.’

‘Yes, Corey, the crowd hold their breath as Johnson stands over the ball. He sends it forward, but does it have the legs? It’s going… It’s going…’

‘It’s…’

‘in…’

‘the…’

‘HOLE!’

We have built most of the mechanics for our Golf game. Now we just need to add the last parts of our code to finish it off. The remaining steps are
  1. 7.

    In the hole

     
  2. 8.

    Scoreboard

     

Step 7: In the hole

In actual fact, ...

Get Game Programming with Code Angel: Learn how to code in Python on Raspberry Pi or PC now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.