home *** CD-ROM | disk | FTP | other *** search
- 5 gosub 5000
- 10 goto 1370
- 20 rem golf
- 30 rem ** accuracy subr **
- 40 z=rnd(0):z2=int(54*z)+1:ac=int(3*log(z2))-1
- 50 if ac<0 then ac=0
- 60 return
- 70 rem ** distance subr **
- 80 z=rnd(0):x=20:a=0:odl=dl
- 90 if cl=12 or cl=13 then 130
- 100 if cl=1 then x=80
- 110 if (cl=2 or cl=3) then x=30
- 120 goto 210
- 130 print:print"1/3, 2/3, or full (1, 2, or 3)";:x=17
- 140 get a$:if a$="" then 140
- 150 if a$="1" then 190
- 160 if a$="2" then a=17:goto 190
- 170 if a$="3" then a=34:goto 190
- 180 goto 140
- 190 print a$;:gosub 4000
- 200 rem sand/rough more diff longer club
- 210 if (pl=1 or pl=4 or pl=5 or pl=6) and cl<6 then df=.8*df
- 220 if (pl=1 or pl=4 or pl=5 or pl=6) and cl<3 then df=.7*df
- 230 di=int(df*(mr(cl)+(x*z)+a+1))
- 240 rem alter dist hit outside of range
- 250 z=rnd(0):x=int(5*z)+1:if x<>4 then 290
- 260 z=rnd(0):x=int(3*z)+1:if x=2 then 280
- 270 di=int(.9*di):goto 290
- 280 di=int(1.1*di):goto 290
- 290 return
- 300 rem ** trouble type subr **
- 310 z=rnd(0):pl=int(6*z)+1
- 320 return
- 330 rem ** trouble subr **
- 340 df=1
- 350 on pl goto 370,430,470,620,370,620
- 360 rem rough
- 370 z=rnd(0):if ((int(2*z)+1)=1) then 400
- 380 print:print"your ball is in the right rough"
- 390 printdl;"yards from the pin":df=.9:tr=1:goto 680
- 400 print:print"your ball is in the left rough"
- 410 printdl;"yards from the pin":df=.9:tr=1:goto 680
- 420 rem water
- 430 z=rnd(0):wa=int(3*z)+1:print:print wa$(wa)
- 440 dl=dl+10:print"after dropping back it's":print dl;"yards from the pin"
- 450 sr(i)=sr(i)+1:goto 680
- 460 rem woods
- 470 z=rnd(0):wo=int(10*z)+1:if wo<>7 then 510
- 480 print:print"aren't you the lucky one. your ball hit"
- 490 print"a couple of trees and then bounced into"
- 500 print"the fairway ";dl;"yards from the green":goto 680
- 510 z=rnd(0):wo=int(3*z):if wo<>1 then 560
- 520 dl=odl:lo=1:sr(i)=sr(i)+1
- 530 print:print"that one's long gone. you might as well"
- 540 print"not even look for it. your ball is "
- 550 print dl;"yards from the pin again":goto 680
- 560 tr=1:print:print"your ball is ";dl;"yards from the pin"
- 570 print"behind some trees, and in a bad lie. "
- 580 print"try to chip it back into":print"into play with a pitching wedge"
- 590 pw$="y"
- 600 goto 680
- 610 rem sand
- 620 tr=1:if dl<=50 then 660
- 630 print:print "you are in a bunker";dl;"yds from the pin"
- 640 z=rnd(0):t=int(z*10):if t=4 then df=1:goto 680
- 650 z=rnd(0):df=int(z*6)/10+.3:goto 680
- 660 print:print"you are in a green side bunker":printdl;"yds from the pin"
- 670 z=rnd(0):df=int(z*5)/10+.5
- 680 return
- 690 rem ** choose club subr **
- 700 print"which club ? [157][157][157][157]";
- 710 get a$:if a$="" then 710
- 711 ifa$=chr$(13) then 4100
- 720 if(a$>="1"anda$<="9")ora$="p"ora$="s"ora$="c"then print a$;:goto 740
- 730 goto 710
- 740 get b$:if b$="" then 740
- 750 print b$;:if asc(b$)=20 or asc(b$)=157 then goto 710
- 751 if b$=chr$(13) then print:print"[145][145]";:goto 700
- 760 if b$="w" and (a$>="1" and a$<="3") then cl=asc(a$)-48:goto 820
- 770 if b$="i" and (a$>="2" and a$<="9") then cl=asc(a$)-48+2:goto 820
- 780 if a$+b$="pw" then cl=12:goto 820
- 790 if a$+b$="sw" then cl=13:goto 820
- 800 if a$+b$="cl" then gosub 1900:goto 700
- 810 print:print"[145]";bl$;"[145]";:goto 700
- 820 gosub4000:sr(i)=sr(i)+1
- 830 if cl<>1 or (sr(i)<2 or lo=1) then 880
- 840 rem prevent driver off fairway
- 850 z=rnd(0):dl=dl-(int(17*z)+1)
- 860 print:print"a duff. your ball is now";dl;"yards":print"from the hole."
- 870 print"even the pros don't try that one.":goto 700
- 880 if pw$<>"y" or cl=12 then 930
- 890 rem should have followed caddie
- 900 dl=dl+13:print:print"nice job - it bounced off of a tree."
- 910 print"now your're in the fairway":print dl;"yards from the pin"
- 920 sr(i)=sr(i)+1:pw$="n":goto 700
- 930 pw$="n":return
- 940 rem ** putting subr **
- 950 dl=dl*3:if tr=1 then ac=ac*1.25
- 960 rem if cl>11 and dl>0 and tr=0 then 803
- 970 dl=int((dl^2+ac^2)^0.5)
- 980 ifac<3andabs(dl)<10thenprint:print:print"nice shot - it hit the pin !"
- 990 if dl>1 then 1030
- 1000 z=rnd(0):x=int(z*7)+1
- 1010 if x=3 then print:print"too bad - your ball is on the lip":goto 1040
- 1020 print:print"your ball is 1 foot from the hole":goto 1040
- 1030 print:print"your ball is";dl;"feet from the hole"
- 1040 print"putting stroke (1-7)";
- 1050 get a$:if a$="" then 1050
- 1060 printa$;:p=asc(a$)-48:if p<1 or p>7 then print:goto 1040
- 1070 sr(i)=sr(i)+1 :gosub 4000
- 1080 z=rnd(0):di=int(10*z)+(p-1)*10+1
- 1090 if dl<2 and p=1 then 1220
- 1100 if dl<10 and abs(dl-di)>4 and p<2 then 1080
- 1110 if dl>6 or abs(dl-di)<4 then 1130
- 1120 z=rnd(0):x=int(4*z)+1:if x<>3 then di=dl
- 1130 if dl<26 or abs(dl-di)>3 then 1150
- 1140 z=rnd(0):z2=int(7*z)+1:ifz2<>2thenz=rnd(0):dl=int(15*z)+1:goto 1160
- 1150 dl=dl-di:if abs(dl)<4 then 1220
- 1160 if di<15 then print:print"dribble...":goto 1180
- 1170 print:print"dribble..trickle.."
- 1180 if dl>0 then dl=dl-2:goto 990
- 1190 dl=dl+2
- 1200 ifdl=-1thenprint:print"too much-you slid by 1 foot";:dl=-dl:goto 1020
- 1210 print:print"too much-you slid by";:dl=-dl: printdl;"feet";:goto 1030
- 1220 if di<6 then print:print"...plunk":goto 1260
- 1230 if di<15 then print:print"trickle...plunk":goto 1260
- 1240 if di<25 then print:print"dribble..trickle..plunk":goto 1260
- 1250 print:print"squiggle..dribble..trickle..plunk"
- 1260 print"in the hole"
- 1270 return
- 1280 data 4,8,11,15,20,24,27,32,36,40,43,47,52,56,60,63,68,72
- 1290 data 301,347,152,407,485,390,212,515,337
- 1300 data 385,179,420,614,414,432,225,530,440
- 1310 data 4,4,3,4,5,4,3,5,4,4,3,4,5,4,4,3,5,4
- 1320 data 20,22,18,20,27,20,21,25,21,23,15,23,28,22,23,20,18,19
- 1330 data 20,20,20,25,30,25,10,30,20,23,20,25,30,30,30,20,30,28
- 1340 data 210,200,180,170,160,150,140,130,120,110,100,50,0
- 1350 data 210-290,200-230,180-210,170-190,160-180,150-170,140-160,130-150
- 1360 data 120-140,110-130,100-120,50-100,0-50
- 1370 print"[147]"
- 1380 dim cn$(14),na$(4),yd(18),pa(18),gs(18),tp(18),mr(13),mr$(13),ts(4)
- 1390 dim pd(4),sr(4),fw(18),pm$(7)
- 1400 wa$(1)="your ball landed in a creek"
- 1410 wa$(2)="do you have scuba diving equipment with you? its in a pond"
- 1420 wa$(3)="splash! you'll have a hard time finding it - its in a lake"
- 1430 x=rnd(ti):fori=1to40:bl$=bl$+" ":next
- 1440 pm$(1)="double eagle!!":pm$(2)="eagle!":pm$(3)="birdie":pm$(4)="par"
- 1450 pm$(5)="bogey":pm$(6)="double bogey":pm$(7)="triple bogey"
- 1460 fori=1to18:read tp(i):next:for i=1to18:read yd(i):next
- 1470 fori=1to18:read pa(i):next
- 1480 for i=1to18:read gs(i):next:for i=1to18:read fw(i):next
- 1490 for i=1to13:read mr(i):next:for i=1to13:read mr$(i):next
- 1500 poke 53280,5:poke 53281,5
- 1510 print"[147]welcome to the tanglewood country club."
- 1520 print" do you want instructions (y/n)?";
- 1530 get a$:if a$="" then 1530
- 1540 print a$;:if a$="n" then 1760
- 1550 print"[147]welcome to the [153]tanglewood country club,"
- 1560 print" a simulated golf course. available "
- 1570 print" for you is a full set of clubs "
- 1580 print"consisting of the following, along with"
- 1590 print" expected ranges & selection codes.":print
- 1600 print"[158]club";tab(8)"[158]range";tab(15);"[158]code";tab(21)"[158]club";
- 1610 print tab(28);"[158]range";tab(35);"[158]code":print"[146]"
- 1620 fori=1to3:print"[151]"str$(i)"wood"tab(7)""mr$(i)tab(15);""str$(i);"w":next
- 1630 fori=4to6:print"[151]"str$(i-2)"iron";tab(7)""mr$(i)tab(15)""str$(i-2);"i"
- 1640 next:print"";:print
- 1650 fori=7to11
- 1660 printtab(20)"[151]"str$(i-2);"iron";
- 1665 printtab(27)""mr$(i);tab(35)""str$(i-2);"i":next
- 1670 print tab(20);"[151] pw ";tab(28)""mr$(12);tab(35);" pw"
- 1680 print tab(20);"[151] sw ";tab(29)""mr$(13);tab(35);" sw"
- 1690 print:print"the course is 6785 yds. long with a par"
- 1700 print"of 72, and has plenty of rough, water,"
- 1710 print"trees & bunkers. i will caddie for you"
- 1720 print"(at a modest rate) & i know the course"
- 1730 print"pretty well. as in a real game of golf,"
- 1740 print"unexpected triumphs and disasters lay "
- 1750 print"ahead of you. good luck and have fun!"
- 1751 print" press any key to continue.
- 1752 [161]a$:[139]a$[178]"" [167] 1752
- 1760 [153]"load number of players poke(1-4poke)";
- 1770 [161] a$:[139] a$[178]"" [167] 1770
- 1780 [153] a$:[139] a$[179]"1" [176] a$[177]"4" [167] 1760
- 1790 np[178][198](a$)[171]48:[129]i[178]1[164]np
- 1800 na$(i)[178]"":[153]"loadsys player #";i
- 1805 [153]"what is your namepoke: ";
- 1807 [153]"tocmd";:na$(i)[178]""
- 1810 [161] a$:[139] a$[178]"" [167] 1810
- 1820 [139] a$[178][199](13)[175][195](na$(i))[177]0 [167] [153]" ":[137] 1860
- 1821 [139] a$[178][199](13)[167] 1810
- 1830 [139] a$[178][199](20)[175][195](na$(i))[178]0 [167] 1810
- 1831 [139] a$[178][199](20)[167]na$(i)[178][200](na$(i),[195](na$(i))[171]1):[153]a$;:[137]1810
- 1832 [139] [195](na$(i))[177]12 [167] 1810
- 1833 [139] a$[179]" "[176]a$[177]"z" [167] 1810
- 1840 na$(i)[178]na$(i)[170]a$:[153]a$"tocmd";:[137] 1810
- 1860 :
- 1880 [130]:[153]"load"
- 1890 [137] 2010
- 1900 [153]:[153]
- 1910 [143]
- 1920 [153]"loadpoke your clubs sir,":[153]"syswoodswait"
- 1930 [129] t[178]1[164]3:[153]""[196](t);"w ";mr$(t):[130]
- 1940 [153] "onononon";[163]11) "sysironswait":[153]"on";
- 1950 [129] t[178]4[164]8:[153] [163]16);""[196](t[171]2);"i ";mr$(t):[130]
- 1960 [153]"ononononon";
- 1970 [129] t[178]9[164]11:[153] [163]27);""[196](t[171]2);"i ";mr$(t):[130]
- 1980 [153] [163]28);"pw ";mr$(12):[153] [163]28);"sw ";mr$(13)
- 1990 [153]"":[142]
- 2000 [143] ** main loop for each hole **
- 2010 [153]"load":[129]h[178]1[164]18:[129] i[178]1[164]np
- 2020 dl[178]yd(h):sr(i)[178]0
- 2030 [153]"load";:[141] 1920:[153]"hole # ";h;" par";pa(h);yd(h);"yards";
- 2040 [139] pa(h)[179]4 [167] [153]:[137] 2080
- 2050 [139] fw(h)[179]22 [167] [153]" narrow-fw":[137] 2080
- 2060 [139] fw(h)[179]29 [167] [153]" medium-fw":[137] 2080
- 2070 [153]" wide-fw"
- 2080 [153]"player #";i;na$(i)
- 2090 df[178]1:pl[178]0:tr[178]0
- 2100 [141] 700
- 2110 [141] 80:[141] 40
- 2120 [139] cl[178]1 [167] ac[178]ac[172]3
- 2130 [139] cl[178]2 [167] ac[178][181](ac[172]2.5)
- 2140 [139] cl[178]3 [167] ac[178][181](ac[172]2)
- 2150 [139] cl[177]3 [175] cl[179]8 [167] ac[178][181](ac[172]1.5)
- 2160 lo[178]0:dl[178]dl[171]di
- 2170 [139] dl[179][177]0 [167] 2230
- 2180 [139] ac[177]3 [167] 2220
- 2190 [139] sr(i)[179][177]1 [167] 2210
- 2200 [153]"load":[153]:[153]:[153]"h o l e i n o n e !!!!":[137] 2400
- 2210 [153]:[153]:[153]"nice s h o t!!":[153]"its in the hole !":[137] 2400
- 2220 [153]:[153]:[153]"nice shot - pin high":[141] 950:[137] 2400
- 2230 [139] [182](dl)[177]gs(h) [176] cl[177]3 [167] 2270
- 2240 [143] make 2- & 3- wood less accurate when hitting green
- 2250 t[178]dl:dl[178]odl:[141] 80:[141] 40:dl[178]dl[171]di
- 2260 [139] [182](t)[177][182](dl) [167] dl[178]t
- 2270 [139] cl[179]12 [167] 2310
- 2280 [143] make wedges more accurate
- 2290 t[178]dl:dl[178]odl:z[178][187](0):[141] 210:[141] 40:dl[178]dl[171]di
- 2300 [139] [182](t)[179][182](dl) [167] dl[178]t
- 2310 [139] dl[177]0 [167] 2340
- 2320 dl[178][171]dl:[139] dl[179]gs(h) [167] [141] 950:[137] 2400
- 2330 [153]:[153]"too much.":[153]"you overshot the hole by";dl;"yards";
- 2340 [139] dl[179]gs(h) [167] [141] 950:[137] 2400
- 2350 z[178][187](0):de[178][181](5[172]z)[170]1
- 2360 [139] ac[177]fw(h) [176] de[178]4 [167] [141]310:[141] 340:[137] 2100
- 2370 [139] dl[179][178]gs(h) [167] [141]950:[137] 2400
- 2380 [153]:[153]"your ball is in the fairway":[153]dl;"yards from the pin"
- 2390 [137] 2080
- 2400 [153]:[153]"hole";h;"player#";i;"score";sr(i);:ts(i)[178]ts(i)[170]sr(i)
- 2410 t[178]sr(i)[171]pa(h)[170]4:[139] t[177]7 [167] [153]"real bad":[137] 2430
- 2420 [153] pm$(t)
- 2430 [153]:[153]"press any key to continuewait"
- 2440 [161] a$:[139] a$[178]"" [167] 2440
- 2450 [130]
- 2460 [153]"load"
- 2470 [153]:[153]"hole #";h:[153]
- 2480 [129]j[178]1[164]np:[153] na$(j);:[129] k[178][195](na$(j))[164]15:[153] " ";:[130]
- 2490 t[178]sr(j)[171]pa(h)[170]4:[139] t[177]7 [167] [153]"real bad":[137] 2510
- 2500 [153] pm$(t)
- 2510 [130]:[153]
- 2520 [139] h[178]1 [167] [153]:[153]"after 1 hole":[153]:[137] 2540
- 2530 [153]:[153]"after ";h;"holes":[153]
- 2540 [129] j[178]1[164]np:[153] na$(j);
- 2550 [129] k[178][195](na$(j)) [164] 15:[153] " ";:[130]:[153]"is ";
- 2560 x[178]ts(j)[171]tp(h)
- 2570 [139] x[178]0 [167] [153]"even":[137] 2600
- 2580 [139] x[177]0 [167] [153]"+";x:[137] 2600
- 2590 [153] x
- 2600 [130]
- 2610 [153]:[153]"press any key to continuewait"
- 2620 [161] a$:[139] a$[178]"" [167] 2620
- 2630 [130]
- 2640 [153]:[129] j[178]1[164]np:[153]na$(j);" had a ";ts(j):[130]
- 2650 [153]:[153]:[153]"would you like to play again (y/n)?"
- 2660 [161] a$:[139] a$[178]"" [167] 2660
- 2670 [139] a$[178]"y" [167] [138]
- 2680 [137]4200
- 3000 [153]a$;:na$(i)[178][202](na$(i),1,[195](na$(i))[171]1):[142]
- 4000 qa$[178]" ":qd$[178]""
- 4001 [153]qd$:[129]x[178]1[164]14:[153]qa$;:[130]:[153]qd$:[142]
- 4100 [153]: [153]"onsys do you want to quit to loadstar? (y/n)"
- 4102 [161]a$:[139]a$[178]""[167] 4102
- 4105 [139]a$[178]"y"[167] 4200
- 4106 [139]a$[178]"n"[167] 4150
- 4110 [137] 4102
- 4150 [153]"on "
- 4151 [153]"on";:[137] 700
- 4200 [159]15,8,15,"r0:hello connect=hello connect":[132]15,er,er$:[160]15
- 4201 [139] er[179][177]63 [167] [153]"load":[128]
- 4205 [147]"hello connect",8
- 5000 [151]53280, 6:[151]53281, 1:[153]"loadreturn";:[151]53265,[194](53265)[175]239
- 5001 [153]"list waitclrOusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrPlist waitclrsgnloadstarpres";
- 5002 [153]"entsthenprint# list cont waitclrLandandandandandandandandandandandandandandandandandandandsqr cont listclose closecont ";
- 5003 [153]" cont listclose cont ";
- 5004 [153]" listclose closecont waitOusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrPcont listclose closecont waitclrOsgn";
- 5005 [153]"thenclrPcont listclose cont waitclrsgnsgngolfthenclrthen";
- 5006 [153]" cont listclose cont waitclrLsgnprint#tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(thenclrsqr cont listclose cont waitLandand";
- 5007 [153]"andandandandandandandandandandandandandandandandandandandandandandandsqr cont listclose closecont cont";
- 5008 [153]" listclose closecont list cont waitforOusrusrusrusrusrusrusrusrusrusrusrusrusr";
- 5009 [153]"usrusrusrusrusrusrusrusrusrusrusrusrPcont list cont waitforsgnverifywrittenbyforthen cont list ";
- 5010 [153]"close cont waitforsgnthen cont list closecont waitforsgnverifymichaeljpo";
- 5011 [153]"ltonavageforthen cont list close cont waitforLandandandandandandandandandandandandandandandandandandandandandandandandandsqr cont list ";
- 5012 [153]" cont cont list cont ";
- 5013 [153]" list close closecont list closecont ";
- 5014 [153]" list close cont waitclrOusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrPcont list ";
- 5015 [153]" closecont waitclrsgnpressspacetocontinue+ cont list waitclrLandandandandandandandandandandandandandandandand";
- 5016 [153]"andandandandandandandsqrprint# list print# list "
- 5017 [151]2023,96[170]128:[151]56295,15:[151]53265,[194](53265)[176]16
- 5018 [161]a$:[139]a$[179][177]" "[167] 5018
- 5099 [142]
-