\START85\ \COMMENT=Program file dated 01/10/96, 18:19 \NAME=LinkChk \FILE=LINKCHK.85P :ClLCD :Menu(1,"NEW",NEW,2,"OLD",ST) :Lbl ST :Input "Side (1-Wht, 2-Blk): ",SIDE :FnOff :AxesOff :GridOff :CoordOff :ClDrw :\(-)\1.8\->\xMin :10.8\->\xMax :\(-)\1.7\->\yMin :10.7\->\yMax :For(R,0,8) :Line(R+.5,.5,R+.5,8.5) :End :For(R,0,8) :Line(.5,R+.5,8.5,R+.5) :End :For(R,1,8) :For(C,1,8) :If iPart CHK(R,C)==1 :Circl(R,C,.25) :PtOff(R+3\Delta-x\,C) :If iPart CHK(R,C)==2 :Then :Circl(R,C,.25) :PtOff(R+3\Delta-x\,C) :PtOn(R,C) :End :If fPart CHK(R,C)==.5 :Then :PtOn(R-\Delta-x\,C-\Delta-y\) :PtOn(R+\Delta-x\,C-\Delta-y\) :End :If CHK(R,C)==\(-)\1 :Then :For(Y,C-2*\Delta-y\,C+\Delta-y\,\Delta-y\) :Line(R-4*\Delta-x\,Y,R+4*\Delta-x\,Y) :End :End :End :End :Lbl MNU :StPic CP :Menu(1,"MOVE",MOVE,2,"JUMP",JUMP,3,PCE,SWITCH,4,"EXIT",EXIT,5,"NEW",NE\#\ W) :Lbl MOVE :Input :round(x,0)\->\A :round(y,0)\->\B :Input :round(x,0)\->\C :round(y,0)\->\D :If iPart CHK(A,B)\<>\WHS or iPart CHK(A,B)\<>\SIDE :Goto MNU :If abs (C-A)\<>\1 or abs (D-B)\<>\1 or CHK(C,D)\<>\0 or CHK(A,B)\<=\0 :Goto MNU :If ((D-B)<0 and CHK(A,B)==1) or ((D-B)>0 and CHK(A,B)==2) :Goto MNU :Lbl CNG :CHK(A,B)\->\CHK(C,D) :0\->\CHK(A,B) :Circl(C,D,.25) :PtOff(C+3\Delta-x\,D) :If iPart CHK(C,D)==2 :PtOn(C,D) :If fPart CHK(C,D)==.5 :Then :PtOn(C-\Delta-x\,D-\Delta-y\) :PtOn(C+\Delta-x\,D-\Delta-y\) :End :Goto CLR :Lbl JUMP :Input :round(x,0)\->\A :round(y,0)\->\B :Input :round(x,0)\->\C :round(y,0)\->\D :If iPart CHK(A,B)\<>\WHS or iPart CHK(A,B)\<>\SIDE :Goto MNU :If abs (C-A)\<>\2 or abs (D-B)\<>\2 or CHK(C,D)\<>\0 or CHK(A+((C-A)/2\#\ ),B+((D-B)/2))==0 or CHK(A,B)\<=\0 :Goto MNU :If ((D-B)<0 and CHK(A,B)==1) or ((D-B)>0 and CHK(A,B)==2) :Goto MNU :If (iPart (CHK(A,B)))==(iPart (CHK(A+((C-A)/2),B+((D-B)/2)))) :Goto MNU :For(X,(A-4*\Delta-x\+((C-A)/2)),(A+4*\Delta-x\+((C-A)/2)),\Delta-x\) :For(Y,(B-2*\Delta-y\+((D-B)/2)),(B+\Delta-y\+((D-B)/2)),\Delta-y\) :PtOff(X,Y) :End :End :0\->\CHK(A+((C-A)/2),B+((D-B)/2)) :Goto CNG :Lbl CLR :For(X,A-4*\Delta-x\,A+4*\Delta-x\,\Delta-x\) :For(Y,B-2*\Delta-y\,B+\Delta-y\,\Delta-y\) :PtOff(X,Y) :End :End :If (WHS==1 and D==8) or (WHS==2 and D==1) :Goto KING :Goto MNU :Lbl KING :iPart CHK(C,D)+.5\->\CHK(C,D) :PtOn(C-\Delta-x\,D-\Delta-y\) :PtOn(C+\Delta-x\,D-\Delta-y\) :Goto MNU :Lbl SWITCH :If WHS==2 :Then :"WHITE"\->\PCE :1\->\WHS :Goto TRNS :End :"BLACK"\->\PCE :2\->\WHS :Lbl TRNS :If SIDE==WHS :Then :Input "CBLGET",CP :ClDrw :RcPic CP :Input "CBLGET",CHK :End :Goto MNU :Lbl NEW :InpSt "Are you sure?",Q :If Q=="Y" :Then :[[1,\(-)\1,1,\(-)\1,0,\(-)\1,2,\(-)\1][\(-)\1,1,\(-)\1,0,\(-)\1,2,\(-)\\#\ 1,2][1,\(-)\1,1,\(-)\1,0,\(-)\1,2,\(-)\1][\(-)\1,1,\(-)\1,0,\(-)\1,2,\(-)\\#\ 1,2][1,\(-)\1,1,\(-)\1,0,\(-)\1,2,\(-)\1][\(-)\1,1,\(-)\1,0,\(-)\1,2,\(-)\\#\ 1,2][1,\(-)\1,1,\(-)\1,0,\(-)\1,2,\(-)\1][\(-)\1,1,\(-)\1,0,\(-)\1,2,\(-)\\#\ 1,2]]\->\CHK :"BLACK"\->\PCE :2\->\WHS :Goto ST :End :DispG :Goto MNU :Lbl EXIT :AxesOn :FnOn :CoordOn :Stop \STOP85\