GOLF 64 STYLE
Now here is your chance to try your golfing skills on the Commodore
64's computerised golf course. This is the perfect way to play golf,
no wind or rain to spoil the play.
It is a game which will require you to choose the right club (to hit
the ball with not to join!), then hit the ball straight and hard at
the green. The object, of course, is to finish the game under par.
The computer will tell you the distance to the green at each hole and
after each stroke will give you a tally of the total number of strokes
you have taken, the number of strokes for the current hole and the par
for the course.
When you get to within 20 yards (18 metres) of the hole you are
considered to be on the green. The Commodore 64 will then putt out
for you and tell you the result.
You have a choice of eight clubs, club number 8 giving you the
greatest distance. Line 210 asks you which club you wish to use.
Line 240 works out how far you have hit the ball.
Line 90 works out the distance from the tee to the cup for each hole
and the routine from line 320 to 360 putts for you.
The hole course is controlled by the FOR/NEXT loop from line 70 to
line 420.
The subroutine from line 500 provides the sound effects. Variable E
is the strokes taken for each hole, variable T the total number of
strokes, Z is the number of putts taken and Q is the par figure.
Golf 64 Style is another game which would be fun to experiment with.
Using it as a basis for a Golf program, try adding new features,
graphics for instance, drawing up a fairway showing where the ball has
landed. You could also add a routine which would cause the ball to
swing to the side. It would also be a good idea to add a more
realistic putting feature.