home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er 1990 December
/
64er_Magazin_90-12_1990_Markt__Technik_de_Side_A.d64
/
colorix-chess
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
1KB
|
21 lines
1 forx=0to5:readfa(x):next:data2,7,5,6,1,11:input"[147]farbe / sw ";a$:sw=(a$="s")
2 poke53281,0:poke53280,0:print"[153][147]":forx=2to14step2:fory=4to16:poke198,0
3 poke1024+x+40*y,160:poke55296+x+40*y,11:nexty,x:fory=4to16step2:forx=3to13
4 poke1024+x+40*y,160:poke55296+x+40*y,11:nextx,y:forf=1to6:ford=0to5
5 x=int(6*rnd(1)):y=int(6*rnd(1)):p=1227+2*x+80*y:ifpeek(p)<>32then5
6 fe(x,y)=f:ifsw=0thenpokep,81:poke54272+p,fa(f-1):nextd,f:goto8
7 pokep,f+48:pokep+54272,1:nextd,f
8 ford=0to35:sp=d-2*int(d/2):print"[151][152]spieler:"sp+1
9 xp=1707+p(0)*2:yp=1239+p(1)*80:pokexp,30:pokeyp,31:pokexp,32:pokeyp,32:geta$
10 ifa$<>" "thenonabs(a$<>""anda$<>"")goto9:p(sp)=p(sp)+1+2*(a$="")
11 p(sp)=abs(p(sp)):ifp(sp)>5thenp(sp)=4
12 onabs(a$<>" ")goto9:onabs(fe(p(0),p(1))=0)goto9:co=fe(p(0),p(1))-1
13 be(sp,co)=be(sp,co)+1:fe(p(0),p(1))=0:poke1227+2*p(0)+80*p(1),32
14 p=1644+sp*10+co-40*be(sp,co):pokep,co+49:pokep+54272,fa(co)
15 ifsp=1thenforc=0to5:iffe(c,sp(1))=0thennext:wi=2:goto18
16 forc=0to5:iffe(sp(0),c)=0thennext:wi=1:goto18
17 nextd:goto19
18 ifwi>0thenprint"[150]gewinner:"wi"[157]durch matt.":poke198,0:wait198,1:run
19 fors=0to1:forf=1to6:s(s)=s(s)+2^be(s,f-1):nextf,s:print"[153]"s(0);
20 printchr$(60-2*(s(0)>s(1))-(s(0)=s(1)));s(1):poke198,0:wait198,1:run