8!EX(8,8),MX(8),MY(8)3 KNIGHT TOURG( J.BARRON 1986d2I111:UD$UD$(184):z<I$"ILLEGAL MOVE"F(142)(8)P:1,7,0Z14)"KNIGHT TOUR"d14)UD$n"THE AIM IS TO MOVE A LONE KNIGHT AROUND"x"A CHESSBOARD,SO THAT IT LANDS ON EACH"8"SQUARE ONCE,AND ONLY ONCE"G1,3,3::i"A TO ATTEMPT IT YOURSELF":"D FOR A COMPUTER DEMONSTRATION":"E TO END"A$:A$"E"A$"A"A$"D"180260XM18:YM18:EX(XM,YM):YM,XMXM18:MX(XM),MY(XM):)A$"A"460:A$"D"940@K:1,1b14)"KNIGHT TOUR"o14)UD$"11)"A B C D E F G H":,I18:8)I;16)I:::611)"A B C D E F G H"@BA3243JYM07:XM07T(XMYM)2((XMYM)2)CD160:CD32%^BAXM2YM80,CD=hBAXM2YM801,CDVrBAXM2YM8040,CDo|BAXM2YM8041,CDzXM,YMBA3202I016:BAI,160:BAI1024,0::BABAII0164040:BAI,160:BAI1024,0::BABAII016:BAI,160:BAI1024,0::BABAI>I0164040:BAI,160:BAI1024,0:D_1,0,22,"YOUR ATTEMPT"1,0,23,"ENTER STARTING POINT "A$:(A$)65(A$)72480X(A$)64:A$;A$:(A$)49(A$)56500Y(A$)48:A$N$" 1":T$(28)"(XY)2((XY)2)T$T$(18)I1,2X9,2Y2,T$N$(146)(144)i&1,0,22,(27)"QMOVE TO ? "0A$:(A$)65(A$)72560:X1(A$)64:A$;DA$:(A$)49(A$)56580NY1(A$)48:A$XDX(XX1):DY(YY1)#bDX1DX2DY1DY2DXDY1,100,20:1,0,24,I$:550_l((31622X180Y1)127)321,100,20:1,0,24,I$:550mvN(N$)1~N$((N),2) ASSESS MOVEM18:XMXMX(M):YMYMY(M)XM1XM8YM1YM8700((31622XM80YM)127)32700EX(XM,YM)EX(XM,YM)1M:T$(28)G(X1Y1)2((X1Y1)2)T$T$(18)p1,2X19,2Y12,T$N$(146)(144)M18:XMXMX(M):YMYMY(M)XM1XM8YM1YM8770((31622XM80YM)127)32770EX(XM,YM)EX(X1,Y1)M99 M:1,0,24,(27)"Q"4 M1003,1015,5:1,0,24,"POOR MOVE"\M1001,800,5:1,0,24,"GOOD MOVE"w  CHECK FOR LEGAL MOVE*TX184TY18>DX(X1TX):DY(Y1TY)HDX1DX2DY1DY2DXDY870R((31622TX80TY)127)32870\TX99:TY99fTY,TX*pTY100XX1:YY1:550Iz1,0,22,(27)"QGAME OVER"s1,0,23,"YOU ACHIEVED "N$" MOVES "N$"64"12501,0,24,"ANY KEY TO CONTINUEA$:1,0,22,"MY DEMONSTRATION"1,0,23,"ENTER STARTING POINT "A$:(A$)65(A$)72960(X(A$)64:A$;GA$:(A$)49(A$)56980ZY(A$)48:A$kN$" 1":TTIxT$(28)(XY)2((XY)2)T$T$(18)1,2X9,2Y2,T$N$(146)(144)B8:EX(X,Y)99:(N$)641120M18:XMXMX(M):YMYMY(M)%$XM1XM8YM1YM81100<.EX(XM,YM)991100k8EX(XM,YM)EX(XM,YM)1:NEX(XM,YM)(0)100BNBBN:BXXM:BYYMLM:XBX:YBY:1,0,24,"MY MOVE "(X64)(Y48)VN$(((N$)1),2):1010`TTITj1,0,23,"I'VE FINISHED (IN"((T6.5)10)" SECONDS)"Et1,0,24,"ANY KEY TO CONTINUE"(154)P~A$:e2,3,4,4,4,4,3,2z3,4,6,6,6,6,4,34,6,8,8,8,8,6,44,6,8,8,8,8,6,44,6,8,8,8,8,6,44,6,8,8,8,8,6,43,4,6,6,6,6,4,32,3,4,4,4,4,3,2%-2,1,-1,2,1,2,2,1,2,-1,1,-2,-1,-2,-2,-161290: TUNE?N,DXN9991,N,D:1260^ 704,48,685,16,643,48,685,16,704,32,739,32,770,32,704,32,785,32,770,32739,32,704,32,685,32,643,32,685,32,596,32,704,48,685,16,643,48,685,16>704,32,739,32,770,32,834,32,810,16,770,48,739,48,770,16,704,96,999,1