SpeChess hhj WSPECTRUM CHESS by Christopher Leigh from Sinclair User, Oct'82 Corrections by JimG  Christopher Leigh 1982 ( < F1:1:6: P,9 ,8;1;"SPECTRUM CHESS" Z212 ,10 ;1;1;"Thinking!" _ dSet up user graphics n&n=121:21 user graphics xm=07:a (n+143)+m,a m:n K0,0,25,25,31,31,7,7:rook M0,0,152,152,248,248,224,224 E7,7,15,15,31,31,0,0 M224,224,240,240,248,248,0,0 K0,0,4,3,3,5,15,31:knight M0,0,128,192,224,240,240,240 D25,1,3,7,15,15,0,0 M240,240,240,240,240,240,0,0 J0,0,1,3,7,6,14,8:bishop K0,0,128,192,224,96`,112p,16 C8,14,6,7,3,15,0,0 K16,112p,96`,224,192,240,0,0 J0,0,25,25,6,6,1,1:queen K0,0,152,152,96`,96`,128,128 "G15,15,15,15,15,15,0,0 ,G0,0,1,1,7,7,1,1:king 6M0,0,128,128,224,224,128,128 @G0,0,0,1,1,7,7,7:pawn JK0,0,0,128,128,224,224,224 TC7,1,1,15,15,0,0,0 ^K224,128,128,240,240,0,0,0 h w=1:initialise position  *Initial positions - lower case for white b$(8,8,4) >b$(1,1)="abcd":b$(1,8)="abcd":rook @b$(1,2)="efgh":b$(1,7)="efgh":knight &@b$(1,3)="ijkl":b$(1,6)="ijkl":bishop 0#b$(1,4)="mnoh":queen :"b$(1,5)="pqcd":king D3n=18:b$(2,n)="rstu":n:pawns N:n=18:b$(7,n)="RSTU":n:black pieces Xb$(8,5)="PQCD" bb$(8,4)="MNOH" l8b$(8,3)="IJKL":b$(8,6)="IJKL" v8b$(8,2)="EFGH":b$(8,7)="EFGH" 8b$(8,1)="ABCD":b$(8,8)="ABCD" jw1520:stops board printing I disabled this as otherwise theboard isn't reset right. [JimG]  print blank board 7:7:0: 8;"A B C D E F G H" ,n=18:2*n,6;n:n L9n=03:m=03:b=01 Vp2+4*n+b,8+4*m;"  ":2 magenta paper spaces followed by 2 green paper spaces `]4+4*n+b,8+4*m;"  ":coloured spaces the other way around j b:m:n  ?t=0:print pieces Moved this from end of line 1520 &v=18:n=18 0:8:1:m=14:I changed PAPERto "transparent", as otherwise the board colours got lost when pieces were moved. [JimG] b=b$(v,n,m) b=" "1580,:one space 8b>90Zb=b-32 :7:lower case is white "#b=b+79O:convert to graphics ,$r=v*2+((m-1)/2) 6:s=6+2*n:(m/2)=m/2s=s+1 @ r,s;b Jm:t O8wv=2n=8v=6:stops space printing Tn:v  w=0:enter moves Ma$(4):"Enter your move as eg f1g2"'"If you wish to stop enter 0 ";a$ ,a$(1)="0"2180:another game? n=a$(1) ,n<73In=n-64@:accepts capitals  *n>96`n=n-96`:and lower case v=a$(2)  n1=a$(3) *n1<73In1=n1-64@ 4n1>96`n1=n1-96` >v1=a$(4) Hv>8v<1n>8n<1v1>8v1<1n1>8n1<1"Invalid move. Try again ";a$:2020 Rb$(v1,n1)=b$(v,n) \b$(v,n)=" ":four spaces f$t=1:1530:erase piece kJb$(v1,n1,1)="r"v1=8b$(v1,n1)="mnoh":change pawn to queen l4b$(v1,n1,1)="R"v1=1b$(v1,n1)="MNOH" p5v=v1:n=n1:1530:print piece in new position z2020:next move %"Do you want another game? y/n ";c$ 6c$="y"c$="Y"w=1:500:reset board 0:0: