home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C64 Live 6
/
C64_Live_6_19xx_-_de.d64
/
golf
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
8KB
|
195 lines
5 print"[147][155]*** golf ***":v=53248:poke v+21,0:poke v+32,11:poke v+33,11:goto 15
6 rem
7 if z>w then z=z and w:poke v6,c
8 return
9 if d-c>w then poke v6,peek(v6)or 16:c=w+1:return
10 if d<c then poke v6,peek(v6)and not 16:c=0
11 return
15 v6=v+16:v0=v+30:v1=v0+1:o=21.9:w=255:m=40:sx=.8:sy=.8:s=54272:j=56320:b=2040
16 dim p%(38),p(50):for i=0 to 38:read p%(i):next
17 for i=0 to 7:read r(i),g(i),b(i),h(i):next:n=20
18 for i=0to 10:read p(i):p(n+i)=-p(i):p(n-i)=p(i):p(m-i)=-p(i):p(m+i)=p(i):next
20 for i=832 to 864:read q:poke i,q:next:for i=i to 989:poke i,0:next
25 for i=i to i+33:read q:poke i,q:next:for i=12800 to i+46:read q:poke i,q:next
30 for i=i to i+38:poke i,0:next:for i=i to i+297:read q:poke i,q:next
35 poke 924,24:poke 927,60:poke 930,60:poke933,24:pokev+42,5:pokev+43,1:
40 def fn b(x)=o+(sin(x/2)+cos(x/4))/2
42 def fn h(x)=k+sin(x/5)/2+(x-a)*l
45 poke v+37,10:poke v+38,0:poke b,200:poke b+3,203:poke b+4,14
50 poke s,0:poke s+6,0:poke s+7,0:poke s+9,0:poke s+10,8
55 poke s+13,0:poke s+14,0:poke s+19,9:poke s+20,0:poke s+24,15
60 print"[147]":poke v+33,6:poke v+32,11
62 print tab(14)"[213][192][201][213][192][201][201] [213][192][201]"
65 print tab(14)"[221] [221][160][221][221][160][160][221]"
68 print tab(14)"[221][192][201][221] [221][221] [171][192]"
70 print tab(14)"[221] [221][221] [221][221] [221]"
72 print tab(14)"[202][192][203][202][192][203][202][192][203][203]"
75 print tab(14)"************[144]"
80 print tab(8)"1 player........ key 1"
82 print tab(8)"2 players....... key 2":i=10
85 get a$:if a$="1"or a$="2"then 90
86 a=55600:for k=0 to 38:poke a+p%(k),i^1:next
87 for k=0 to 11:poke 55750+k,i^1:next:i=7-(i=7)*3:goto 85
90 ss=val(a$):bs(1)=999:bs(2)=999:sm(1)=0:sm(2)=0:sp=0
95 s(1)=0:s(2)=0:sp=sp+1:for n=1 to ss:poke s+8,15:poke s+12,5:poke s+15,150
99 rem
100 poke v+33,9:print"[147]":poke v+33,6:poke v+32,11:poke v+23,42:poke v+29,232
105 poke v+28,7:poke v+40,5:poke v+41,5:poke v+44,0:poke v+45,15:poke v+46,15
110 poke b+1,201:poke b+2,202:poke b+5,204:poke b+6,13:poke b+7,15
115 q=rnd(ti):a=q*9999:a%=q*20:x=a+a%:h=fn b(x)
120 y=fn b(x+10):if y+1<h then 115
125 if y>h then h=y
130 z=a%+55297+int(h)*m:for i=0 to 8:poke z+i,14:next
135 z=z+41:for i=0 to 6:poke z+i,14:next:l=a%+1024:r=l+10
140 k=0:for x=a+37 to a+39:if fn b(x)>=22 then k=1
145 next:y=56173:for i=0 to 2:for x=0 to k:poke y+i+x*m,8:next:next
150 poke v6,1:poke v,64:poke v+1,fn b(a+38)*8+35
155 k=1:if a%>14 then k=3:goto 165
160 if a%>7 then k=2
165 x%(k-1)=a%+8:for i=k to 3:x%(i)=rnd(1)*(11+i*6-x%(i-1))+x%(i-1)+6:next
170 on k goto 185,180
175 x%(1)=rnd(1)*(a%-12)+4:x%(2)=rnd(1)*(a%-8-x%(1))+x%(1)+6:goto 185
180 x%(1)=rnd(1)*(a%-6)+4
185 x%=rnd(1)*3+1
190 y%=rnd(1)*3+1:if y%=x%then 190
195 k=6-x%-y%:x=x%(x%):z=x*8+18:c=3:gosub 7:poke v+2,z:poke v+3,fn b(x+a)*8+8
200 x=x%(y%):z=x*8+18:c=5:gosub 7:poke v+4,z:poke v+5,fn b(x+a)*8+29
205 x=x%(k):z=x*8+8:c=41:gosub 7:poke v+6,z:poke v+10,z
210 z=fn b(x+a)*8+8:poke v+7,z:poke v+11,z:poke v+8,0
215 poke v+12,132:poke v+13,73:poke v+14,180:poke v+15,63
220 x=a:for i=1024 to 1063:if i>l and i<r then y=h:goto 230
225 y=fn b(x)
230 y%=y:poke i+m*y%,b(8*(y-y%)):for y=y%+1 to 24:poke i+m*y,160:next:x=x+1:next
235 print"[144]":on ss gosub 670,680:l=a%+2:r=l+10
240 print tab(5)"[172][190] [188][146][187]":print tab(5)"[190] [188]"
245 print tab(5)" [152] ":print tab(3)"[164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
250 print tab(5)"[187] [172][144]":poke v+21,w:z=931:p=0:u=5
254 rem
255 c=0:x=a:x%=0:d=14
260 poke s+6,0:y=fn b(x):e=y*8+37:x=0
265 poke v+8,d-c:poke v+9,e:poke v+27,0:gosub 650:if x%>38 then 310
270 gosub 550:f=2*sgn(t):k=f:g=g*t:g=g*g:t=p(p)/t:poke v+27,16
275 poke z,0:poke s+4,129:y=peek(v0)+peek(v1)
280 d=d+k:if d<14 or d>328 then poke s+5,9:poke s+4,0:poke s+4,17:k=-k:d=d+k+k
285 if peek(v0)and 14 then poke s+18,0:poke s+18,129:k=-k:d=d+k+k
290 x=x+f:y=e+x*(x/g-t):if y>240 then 300
295 gosub 9:poke v+8,d-c:poke v+9,y:if not peek(v1)and 16 then 280
300 x%=d/8+.5:if x%>l and x%<r then poke v+9,h*8+40:goto 500
305 poke s+11,0:poke s+11,17:x=x%-2+a:d=x%*8-2:gosub 9:goto 260
309 rem
310 print"":for i=0 to 28:for k=0 to 4:print"";chr$(20):next:print"[145][145][145][145][145][145]"
315 poke s+18,16:poke s+18,17:for t=0 to 50:next:next
319 rem
320 poke v+21,0:print"[147]":poke v+33,9:poke v,207:poke v+1,120:poke v+28,1
325 poke b+1,13:poke b+2,15:poke b+5,205:poke b+6,205:poke b+7,205
330 poke v+40,15:poke v+41,15:poke v+44,7:poke v+45,13:poke v+46,7
335 for i=v+10 to v+13:poke i,rnd(1)*140+25:i=i+1:poke i,rnd(1)*85+120:next
340 poke v+14,rnd(1)*62:poke v+15,rnd(1)*85+120:poke v6,128
345 e=(y-19)*50+35:d=int((rnd(1)+x%-39)*104+15):c=0:gosub 9
350 poke v+8,d-c:poke v+9,e:poke s+8,5:poke s+12,96
355 poke v+2,132:poke v+3,73:poke v+4,180:poke v+5,63
360 x%=(fn b(a+39)-fn b(a+37))*7:q=sgn(x%):l=q/9:k=6-q-q:q=q*sx:poke 55720,0
365 x=a:for i=1024 to 1063:y=fn h(x):y%=y:for t=0 to y%-1:poke i+t*m,160:next
370 poke i+m*y%,h(8*(y-y%)):x=x+1:next
375 poke s+15,15:on ss gosub 670,680:poke v+23,192:poke v+29,102:poke v+21,247
380 gosub 650:gosub 550:g=g/4+1:f=p(p):poke z,0:poke s+4,129
384 rem
385 i=peek(v0)+peek(v1):for i=g to 1 step-.07:x0=d:y0=e:if i<3 then d=d+q:e=e+sy
390 d=d+t*i:if d<14 or d>330 then poke s+18,0:poke s+18,17:t=-p(p+10):d=x0
395 if peek(v1)and 16 then if e<109 then e=fn h((d-14)/8+a)*8+m:i=i-.1:goto 415
400 h=peek(v0):e=e-f*i:if e>237 then poke s+18,0:poke s+18,17:f=-p(p):e=y0
405 if h and 16 then if not h and 1 then i=i-.4:poke s+11,0:poke s+11,129
410 if e<126 and e>120 then if d<211 and d>205 then 435
415 d=int(d+.5):y%=e+.5:gosub 9:poke v+8,d-c:poke v+9,y%:next
420 if peek(v1)and 16 then if e<109 then poke v+9,y%+3:e=e+3
425 if e<160 then if d<250 and d>170 then poke 1448,87:poke v+21,246:goto 380
430 poke 1448,32:poke v+21,247:goto 380
434 rem
435 poke v+8,208:poke v+9,123:gosub 650:poke s+12,0:poke s+13,89:poke v+32,2
440 poke s+11,0:poke s+11,65:gosub 490:poke v+33,8:gosub 490:poke v+32,11
445 gosub 490:poke v+33,9:gosub 490:poke v+21,0:poke s+11,0:poke s+13,0:next n
450 for i=1 to ss:sm(i)=sm(i)+s(i):if s(i)<bs(i)then bs(i)=s(i)
455 next:print"[147]":poke v+33,8:on ss gosub 700,705
460 print tab(5)"from the front.... key v":print tab(5)"(oints : 0)"
465 print tab(5)"continue.......key v or fire "
470 get a$:if peek(j)and 16 then if a$<>"v"and a$<>"v"then 470
475 if a$="v"then 60
480 goto 95
489 rem
490 for i=0 to 3:for f=20 to 50:poke s+8,f:next:next:return
499 rem
500 poke s+5,9:pokes+6,58:poke v+32,8:poke s+4,0:poke s+4,129
505 for i=10 to m step.3:poke s+1,i:next:poke v+32,11
510 for i=25 to 70 step.3:poke s+1,i:next:poke v+32,8:poke s+4,128
515 for i=0 to 300:next:poke s+5,5:poke v+32,11:goto 255
549 rem
550 poke s+1,w:poke s+5,2:poke s+4,32:poke z,r(u):poke s+4,33:poke s+1,30
555 f=not peek(j):if f and 16 then 595
560 if f and 4 then p=p+(p=m)*p+1:goto 635
565 if f and 8 then 630
570 get a$:if a$=""then 555
575 if a$="[157]"then p=p+(p=m)*p+1:goto 635
580 if a$=""then 630
585 if a$<>" "then 555
590 for i=0 to 180:next
595 i=853:t=0:g=2:s(n)=s(n)+1
600 if g>13 then g=g^1:goto 620
605 g=g+.23:if t>7 then t=0:i=i+1:if i=856 then i=1011
610 if i=1013 then f=g(t)or 1:poke i,f:poke i+3,f:poke i+6,f:goto 620
615 poke i,g(t):poke i+3,g(t):poke i+6,g(t)
620 t=t+1:get a$:if not peek(j)and 16 or a$=" "then 600
625 t=p(p+10):on ss gosub 670,685:poke s+4,0:poke s+5,5:return
630 p=p-(p=0)*m-1
635 y%=11-9*p(p):x%=11.5+10*p(p+10):a%=x%/8:u=x%and 7
640 poke z,0:z=896+a%+3*y%:poke z,r(u):goto 555
649 rem
650 poke 1019,1:poke 1016,1:poke 1013,1:poke 1018,0:poke 1015,0:poke 1012,0
655 poke 1017,0:poke 1014,0:poke 1011,0:poke 861,0:poke 858,0:poke 855,0
660 poke 860,0:poke 857,0:poke 854,0:poke 859,128:poke856,128:poke853,128:return
669 rem
670 print""
675 print tab(9)"game "sp tab(24)"[146]strokes :"s(1):return
679 rem
680 poke 1041+n*24,81:poke 55313+n*24,15
685 print""
690 print"1.player "s(1)tab(18)""sp"[157] "tab(26)"[146]2.player "s(2):return
699 rem
700 gosub675:printtab(13)"best game "bs(1):printtab(13)"total"sm(1):return
704 rem
705 gosub690:print" best"bs(1)tab(25)"best"bs(2)
710 print" total"sm(1)tab(25)"total"sm(2):return
755 data-88,-89,-90,-50,-10,30,70,71,72,32,-8,-9,-85,-86,-87,-47,-7,33,73,74
760 data 75,35,-5,-45,-84,-44,-4,36,76,77,78,79,39,-1,,-41,-81,-80,-79
765 data 192,128,160,99,96,192,227,119,48,224,247,120,24,240,248,226
770 data 12,248,98,249,6,252,121,239,3,254,111,228,3,255,100,160
774 rem
775 data.001,.156,.309,.454,.588,.707,.809,.891,.951,.986,.999
779 rem
780 data 226,57,200,166,8,74,162,57,206,162,32,66,226,57,194
785 data 8,66,16,255,255,255,128,,,128,,,128,,,255,255,255
789 rem
790 data 115,156,231,66,4,165,115,136,231,18,136,161,115,136,231
795 data 132,33,8,255,255,255,,,1,,,1,,,1,255,255,255,
799 rem
800 data,12,,,13,,,13,64,,13,64,,13,16,,13,84,,13,80,,13,,
805 data 12,,,12,,,12,,,12,,,12,,,12,,,12,,,63
809 rem
810 data 8,,,8,,,42,,,34,,,168,128,,170,128,2,170,128,2,170
815 data 160,10,46,160,10,190,168,10,62,40,,60,,,60,,,60,,
819 rem
820 data,170,,2,170,128,10,170,168,10,42,168,42,168,168,34,130,170,42,42
825 data 170,40,170,42,168,138,170,162,40,162,40,170,170,170,170,168,138,186
830 data 160,170,186,,40,60,,,60,,,60,,,60,,,60,,,60,,,60,,
834 rem
835 data 31,240,,59,254,,59,255,,125,207,128,124,191,224,126,127,224,223,127
840 data 112,227,63,176,125,63,176,62,30,112,1,153,176,,3,224,,1,224,
845 data,,24,,,118,,,205,,,240,,,,,,,,,,,,
849 rem
850 data,,,4,,,4,,,2,48,,3,64,,1,128,,32,128
855 data 128,28,192,64,2,192,64,1,225,128,0,102,64,,124,,,120,,
860 data 112,,6,112,,9,240,,48,240,,,112,0,,112,,,112,,,112,,
864 rem
865 data,2,170,,,,,85,85,,,,10,170,170,,,,5,85
870 data 85,,,,42,170,170,,,,85,85,85,,,,42,170,168,
875 data,,85,85,80,,,,170,170,128,,,,85,85,64,,,,170,170,,