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

14. Golf part 2: On the green

Mark Cunningham1 
(1)
Edinburgh, Scotland
 

‘And that’s a delightful shot from Johnson there, Jim. Both players have found the green in two.’

‘It sure was, Corey. Johnson is sitting about 18 feet from the hole with Miller maybe only 10 feet away, but with a trickier downhill putt. You can cut the tension here with a knife…’

In the last chapter, we completed the setup and displayed the flag in a random position. In this chapter, we will complete the following steps:
  1. 5.

    Power meter.

     
  2. 6.

    Move the ball.

     

Step 5: Power meter

The power meter is used to determine the strength of the player’s shot. The easiest solution would ...

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.