1HOME:? "PRESS NUMBER ON KEYPAD TO PLAY."
2 rx=rx-1:IF  NOT PDL(11) THEN 2
3 junk=RND(rx)
4HOME:? TAB(13); "GOLF"
5? "Welcome to the McEntyre Open.":? "Somewhere near Sacramento"
6? "The commentator will explain":? "the game as you play":?:? TAB(6); "Enjoy the game"
7? "See you at the 19th hole"
8?:?:DIM l(10)
10 g1=18
20 g2=0
30 g3=0
40 a=0
50 n=.8
60 s2=0
70 f=1
80? "What is your handicap? (0-30)"; 
90INPUT h
100IF h>30 THEN 470
110IF h<0 THEN 470
120? "Difficulties at golf include:"
130? "0=hook, 1=slice, 2=low distance 4=trap shots, 5=putting"
140? "Which ONE is your worst?"; 
150INPUT t
160IF t>5 THEN 120
170 s1=0
210REM   
230 l(0)=0
240 l=0
245 q=0
250 s2=s2+1
260 k=0
270IF f=1 THEN 310
290? "Your score on hole "; f-1; " was "; s1
291GOTO 1750
292IF s1>p+2 THEN 297
293IF s1=p THEN 299
294IF s1=p-1 THEN 301
295IF s1=p-2 THEN 303
296GOTO 310
297? "Keep your head down."
298GOTO 310
299? "A par. Nice going."
300GOTO 310
301? "A birdie."
302GOTO 310
303IF p=3 THEN 306
304? "A great big EAGLE."
305GOTO 310
306? "A hole in one!"
310IF f=19 THEN 1710
315 s1=0
316?
320IF s1=0 THEN 1590
330IF l(0)<1 THEN 1150
340 x=0
350IF l(0)>5 THEN 1190
360? "Shot went "; d1; " yards.":? "It's "; d2; " yards from the cup."
362? "Ball is "; INT(o); " yards off line...in "
380GOSUB 400
390GOTO 620
400IF l(x)=1 THEN 480
410IF l(x)=2 THEN 500
420IF l(x)=3 THEN 520
430IF l(x)=4 THEN 540
440IF l(x)=5 THEN 560
450IF l(x)=6 THEN 580
460? "out of bounds."
465GOTO 1690
470? "PGA rules handicap = 0 to 30"
472GOTO 80
480? "Fairway"
490GOTO 1690
500? "Rough"
510GOTO 1690
520? "Trees"
530GOTO 1690
540? "Adjacent fairway"
550GOTO 1690
560? "Trap"
570GOTO 1690
580? "Water"
590GOTO 1690
620IF a=1 THEN 629
621? "Selection of clubs"
622? "Yardage desired  suggested club"
623?:? "200 to 280 yds.     1 to 4"
624? "100 to 200 yds.   19 to 13"
625? "0 to 100 yds.     29 to 23"
626 a=1
629? "What club do you choose?"; 
630INPUT c
632?
635IF c<1 THEN 690
637IF c>29 THEN 690
640IF c>4 THEN 710
650IF l(0)<=5 THEN 740
660IF c=14 THEN 740
665IF c=23 THEN 740
670GOTO 690
680 s1=s1-1
690? "That club is not in the bag."
693?
700GOTO 620
710IF c<12 THEN 690
720 c=c-6
730GOTO 650
740 s1=s1+1
741 w=1
742IF c>13 THEN 960
746IF INT(f/3)=f/3 THEN 952
752IF c<4 THEN 756
754GOTO 760
756IF l(0)=2 THEN 862
760IF s1>7 THEN 867
770 d1=INT(((30-h)*2.5+187-((30-h)*.25+15)*c/2)+25*RND(1))
780 d1=INT(d1*w)
800IF t=2 THEN 1170
830 o=(RND(1)/.8)*(2*h+16)*ABS(TAN(d1*3.5E-03))
840 d2=INT(SQR(o^2+ABS(d-d1)^2))
850IF d-d1<0 THEN 870
860GOTO 890
862? "You dubbed it."
864 d1=35
866GOTO 830
867IF d<200 THEN 1300
868GOTO 770
870IF d2<20 THEN 890
880? "Too much club.":? "Your past the hole."
890 b=d
900 d=d2
910IF d2>27 THEN 1020
920IF d2>.5 THEN 1120
940 l(0)=9
950GOTO 1470
952IF s2+q+(10*(f-1)/18)<(f-1)*(72+((h+1)/.85))/18 THEN 956
954GOTO 752
956 q=q+1
957IF s1/2<>INT(s1/2) THEN 1011
958GOTO 862
960? "Now guage your distance":? "by percent (1 to 100)"
961? "Percent full swing"; 
970INPUT w: w=w/100
972?
980IF w>1 THEN 680
985IF l(0)=5 THEN 1280
990IF c=14 THEN 760
1000 c=c-10
1010GOTO 760
1011IF d<95 THEN 862
1012? "Ball hit tree - bounced":? "in rough "; d-75; " yards from the hole."
1014 d=d-75
1018GOTO 620
1020IF o<30 THEN 1150
1022IF j>0 THEN 1150
1030IF t>0 THEN 1070
1035 s9=(s2+1)/15
1036IF INT(s9)=s9 THEN 1075
1040? "You hooked- "; 
1050 l(0)=l(2)
1055IF o>45 THEN 1092
1060GOTO 320
1070 s9=(s2+1)/15
1071IF INT(s9)=s9 THEN 1040
1075? "You sliced- "; 
1080 l(0)=l(1)
1090GOTO 1055
1092? "Badly."
1094GOTO 320
1100 l(0)=5
1110GOTO 320
1120 l(0)=8
1130 d2=INT(d2*3)
1140GOTO 1380
1150 l(0)=1
1160GOTO 320
1170 d1=INT(.85*d1)
1180GOTO 830
1190IF l(0)>6 THEN 1260
1200? "Your shot went into water."
1210 s1=s1+1
1220? "Penalty stroke assesed.":? "Hit from previous location."
1230 j=j+1
1240 l(0)=1
1242 d=b
1250GOTO 620
1260? "Your shot went out of bounds."
1270GOTO 1210
1280IF t=3 THEN 1320
1300 d2=1+(3*INT((80/(40-h))*RND(1)))
1310GOTO 1380
1320IF RND(1)>n THEN 1360
1330 n=n*.2
1340? "Shot dubbed, still in trap."
1350GOTO 620
1360 n=.8
1370GOTO 1300
1380? "On green "; d2; " feet from the pin"
1381? "Choose your put potency (1-13)."
1382? "Putt potency number?"; 
1400INPUT i
1410 s1=s1+1
1420IF s1+1-p>(h*.072)+2 THEN 1470
1425IF k>2 THEN 1470
1428 k=k+1
1430IF t=4 THEN 1530
1440 d2=d2-i*(4+2*RND(1))+1.5
1450IF d2<-2 THEN 1560
1460IF d2>2 THEN 1500
1470? "You holed it."
1472?
1480 f=f+1
1490GOTO 230
1500? "Putt short."
1505 d2=INT(d2)
1510GOTO 1380
1530 d2=d2-i*(4+1*RND(1))+1
1550GOTO 1450
1560? "Passed by cup."
1570 d2=-d2
1580GOTO 1505
1590READ d, p, l(1), l(2)
1595?
1600? "You are at tee-off hole "; f:? "distance "; d; " yards":? "Par "; p
1605 g3=g3+p
1620? "On your right is "; 
1630 x=1
1640GOSUB 400
1650? "On your left is "; 
1660 x=2
1670GOSUB 400
1680GOTO 620
1690RETURN
1700DATA   361,4,4,2,389,4,3,3,206,3,4,2,500,5,7,2
1702DATA   408,4,2,4,359,4,6,4,424,4,4,2,388,4,4,4
1704DATA   196,3,7,2,400,4,7,2,560,5,7,2,132,3,2,2
1706DATA   357,4,4,4,294,4,2,4,475,5,2,3,375,4,4,2
1708DATA   180,3,6,2,550,5,6,6
1710?
1750 g2=g2+s1
1760? "Total par for "; f-1; " holes is "; g3:? "Your total is "; g2
1761IF g1=f-1 THEN 1770
1765GOTO 292
1770END:TEXT
