home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tiger Disk 21
/
Tiger_Disk_021_19xx_Tiger-Crew-Disk_de_Side_C.d64
/
6.c64
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
4KB
|
134 lines
0 poke45,182:poke46,23:clr
1 poke53281,0:poke53280,5:print"[155]"chr$(142):goto1800
2 poke198,0:wait198,1:geti$:ia=asc(i$):return
100 ifr<ththenx=8:y=10:gosub3100:print"> only[146]"
110 ifr<5theny=9:x=7:gosub3100:ml=ml-1:printml"move [157]";:ifml-1thenprint"s"
115 ifr<1orml<1then5000
120 y=21:x=1:gosub3100:printc$:gosub3100:ifp=cthenprintp$(p):goto1000
125 printp$(p)" (a-l)?"
135 forq=0to11:w(q)=m(q):next:gosub2:ifi$<>"x"then160
150 forq=.to11:w(q)=l(q):next:gosub2990:pokesc,12
152 poke198,0:wait198,1:ifpeek(197)-23then152
155 forq=.to11:w(q)=m(q):next:gosub2990:pokesc,0:goto135
160 m=asc(i$)-65:ifm<.orm>11then135
161 ifm(m)then167
162 forqx=1to10step.2:gosub3100:ifqxand1thenprintc$:goto164
163 print"empty pit!"
164 next:goto120
167 gosub3200:ifr<13thend=1:forq=1to200:next:goto900
170 y=21:x=1:gosub3100:print"which way? "
175 gosub10000
180 getd$:ifd$=""then180
190 d=asc(d$)-45:ifabs(d)-1then180
900 b=1:gosub3200:forq=.to11:l(q)=m(q):w(q)=m(q):next:gosub3300:r=r-s:s(p)=s(p)+s
905 forq=0to11:m(q)=w(q):next:x=13:y=18:gosub3100:printi$chr$(d+61)s"[157] "
910 x=17:y=19:gosub3100:i$=mid$(str$(r),2):x=20-len(i$):print" "
920 gosub3100:printi$:i$=mid$(str$(s(p)),2):x=18-len(i$):y=2+p:gosub3100:printi$
930 ifs(p)>wthen5000
980 p=2+notp:b=.:goto100
1000 bs=-9e9:forg=0to23+tw*(r<th):d=1:y=g:ifg>ethend=-1:y=g-tw
1006 ifm(y)=.then1090
1010 forv=.toe:w(v)=m(v):next:m=y:gosub3300:ifs<=bsthen1090
1025 o=.:cs=.:cr=.:ifezthen1080
1030 w(tw)=w(.):w(th)=w(1):forv=.to11:c1=w(v):ifc1and1thenifc1<7then1040
1035 goto1075
1040 cs=cs+c1:c2=w(v+1):ifc2and1thenifc2<7then1050
1045 goto1075
1050 o=o+c2:c3=w(v+2):ifc3and1thenifc3<7thencr=cr+c1+c2+c3
1075 next
1080 t=s-cr*fr-cs*fs-o*f2:ift>bsthenbs=t:bm=y:bd=d
1090 next:d=bd:m=bm:i$=chr$(m+65):gosub10000:goto900
1800 l1=1309:l$="000003006009091171249246243240158078":mk=249
1810 dimn$(1),p$(1),w(13),m(11),l(11):c$=" "
1820 di=54272:ml=9:e=11:tw=12:th=13:fr=.18:fs=.18:sc=53281:vo=54296
1825 f2=.01:ifpeek(657)=0thennew:
1830 gosub6000
1900 print"play me? y[157]";:c=1
1910 gosub2:ifi$="y"oria=13theni$="y":printi$:goto1950
1915 ifi$<>"n"then1910
1917 printi$
1918 n$(0)="player 1":n$(1)="player 2"
1926 print:input"name of player one";n$(0):c=-1
1930 print:input"name of player two";n$(1)
1935 forq=0to1:n$(q)=left$(n$(q),10):p$(q)=n$(q):next:goto1965
1950 n$(0)="you":n$(1)="me":print:print"do you want to go first? y[157]";
1951 p$(0)="your move":p$(1)="thinking"
1952 gosub2:ifi$="y"oria=13theni$="y":p=0:goto1960
1954 ifi$<>"n"then1952
1956 p=1
1960 printi$:print:print"e[146]asy or h[146]ard? h[157]";
1961 ez=1:gosub2:ifi$="h"oria=13theni$="h":ez=0:goto1963
1962 ifi$<>"e"then1961
1963 printi$
1965 print:print"how many stones? 6[157]";:d$=""
1972 gosub2:ifia=13thenifd$=""theni$="6"
1973 ifi$<"0"ori$>"9"then1972
1974 printi$;:d$=d$+i$:x=val(d$):ifx<2then1972
1980 forq=0to11:m(q)=x:w(q)=x:next:r=x*12:w=r/2
1987 print"[147] score:
1989 [129]q[178]0[164]1:[153][163]15[171][195](n$(q)))n$(q)" 0":[130]:[153]
2010 [153]" a b c d"
2020 [153]" tototototototototototo"
2030 [153]" (NULL)"[166]11)"(NULL)"
2040 [153]" (NULL)"[166]13)"(NULL)"
2050 [153]" lthen"[166]15)"fne"
2060 [153]" then"[166]15)"fn"
2070 [153]" kthen"[166]15)"fnf"
2080 [153]" (NULL)"[166]13)"(NULL)"
2090 [153]" (NULL)"[166]11)"(NULL)"
2100 [153]" tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab("
2110 [153]" j i h g"
2120 b[178]0:[141]2990
2130 [153]:[153]:[153][163]7)"move:":[153][163]7)"remaining:"
2200 q[178]23:[153]""
2210 [153][163]q)" <<< >>> "
2220 [153][163]q)"v ^ ^ v"
2230 [153][163]q)"v <wait ^ ^ >wait v"
2240 [153][163]q)"v ^ ^ v"
2250 [153][163]q)" >>> <<< "
2299 [153]
2300 [153][163]22)"holdwait [x] key for
2310 printtab(22)"previous board.
2400 [153]""[163]22)" m a n c a l a wait"
2900 [137]100
2990 [129]m[178].[164]11:[141]3000:[130]:[142]
3000 l[178]l1[170][197]([202](l$,3[172]m[170]1,3)):j[178][181](w(m)[173]10)[170]48:[139]j[178]48[167]j[178]32
3010 [151]l,j:[151]l[170]di,1:[151]l[170]1,w(m)[171]10[172][181](w(m)[173]10)[170]48:[151]l[170]1[170]di,1:[142]
3100 [153]"";:[139]y[177]0[167][129]q[178]1[164]y:[153]"";:[130]
3120 [153][163]x);:[142]
3200 l[178]l1[170][197]([202](l$,3[172]m[170]1,3)):[129]l[178]l[164]l[170]1
3210 j[178][194](l):[139]j[179][177]32[167][151]l,j[171](j[179]128)[172]128[170](j[177]128)[172]128
3220 [130]:[142]
3300 k[178]w(m):w(m)[178]0:[139]b[167][141]3000
3310 [129]q[178]1[164]k:m[178]m[170]d:[141]3390:w(m)[178]w(m)[170]1:[139]b[167][141]3000
3320 [130]:c1[178]w(m):s[178].:[139]c1[175]mk[167][142]
3330 s[178]c1:w(m)[178].:[139]b[167][141]3000
3340 m[178]m[171]d:[141]3390:c1[178]w(m):[139]c1[175]mk[167][142]
3345 [139]c1[178].[167][142]
3350 m1[178]m:m[178]m[171]d:[141]3390:c2[178]w(m):[139]c2[175]mk[167][142]
3355 [139]c2[178].[167][142]
3360 w(m)[178].:w(m1)[178].:s[178]s[170]c1[170]c2:[139]b[167][141]3000:m[178]m1:[141]3000
3370 [142]
3390 [139]m[179]0[167]m[178]e:[142]
3392 [139]m[177]11[167]m[178]0
3394 [142]
5000 [151]sc,214:x[178]1:y[178]21:[141]3100:[153]c$:[141]3100
5010 [139]s(0)[178]s(1)[167][153]"tie game!":[137]5050
5020 p[178]1:[139]s(0)[177]s(1)[167]p[178]0
5030 [139]c[178][171]1[167][153]n$(p)" wins!":[137]5050
5040 n$(1)[178]"i":[153]n$(p)" win!"
5050 [153]"[r]un";
5090 [161]i$:[139]i$[179][177]"r"[167]5090
5095 [151]sc,27:[138]
6000 [153]"load":x[178]12
6100 [153][163]x)"for(NULL) (NULL)"
6110 [153][163]x)" waitsys (NULL)(NULL)(NULL)(NULL)(NULL)(NULL)(NULL)(NULL)(NULL)(NULL)(NULL)(NULL)(NULL) for "
6120 [153][163]x)" waitclr m a n c a l a for "
6130 [153][163]x)" waitsys usrusrusrusrusrusrusrusrusrusrusrusrusr for "
6140 [153][163]x)"for(NULL) (NULL)"
6200 [153]"print# copyright (c) 1982 bruce robinson"
6210 x[178]13:[153][163]x)"victory software":[153][163]x)"paoli, pa 19301"
6999 x[178]0:[142]
10000 [151]vo,15:a8[178]54272:[151]a8,30:[151]a8[170]1,30:[151]a8[170]5,15:[151]a8[170]6,240
10002 [151]a8[170]4,17:[129]em[178]1[164]200:[130]:[151]a8[170]4,16:[151]vo,0:[142]