5 CLS:PRINT@124,"Do You Want Instructions Y/N ";:S$=INPUT$(1):IFS$="Y"ORS$="y"THENGOSUB685 10 CLS:DEFINTA-Z:PRINT@122,"A Puzzle by Joe Wasserman 73117,3600" 15 ONERRORGOTO460 20 DIMB(9,5),P(1,11,3,1),R(11):A$="ABCDEFGHIJKL" 25 RESTORE665:FORW=0TO1 30 FORZ=0TO11 35 FORY=0TO3 40 FORX=0TO1 45 READC:P(W,Z,Y,X)=C 50 NEXTX,Y,Z,W 55 CLS:LINE(2,2)-(82,50),1,B 60 FORZ=10TO42STEP8 65 FORY=10TO74STEP8 70 PSET(Y,Z) 75 NEXTY,Z 80 RESTORE535 85 FORZ=1TO12 90 GOSUB520 95 NEXT 100 PRINT@280,"Sel. Piece ";:P$=INPUT$(1):IFINSTR("ABCDEFGHIJKLMNO",P$)=0THEN100 105 IFP$="M"THENMENU 110 IFP$="N"THENGOSUB470:GOTO100 115 IFP$="O"THENGOSUB480:GOTO100 120 R1=ASC(P$)-65:R2=R1+1 125 IFMID$(A$,R2,1)=" "THENBEEP:GOTO100 130 PRINT@280,"Reverse Y/N ";:R$=INPUT$(1) 135 IFR$<>"Y"THEN160 140 R(R1)=1*-(R(R1)=0) 145 GOSUB440 150 ONR(R1)+1GOSUB310,375 155 GOSUB520 160 A=38:B=30:C=39:D=31 165 LINE(A,B)-(C,D),1,B 170 I$=INKEY$:IFI$=""THEN170 175 LINE(A,B)-(C,D),0,B 180 IFI$=CHR$(13)THEN235 185 ONASC(I$)-27GOSUB195,205,215,225:GOTO165 190 GOTO170 195 A=A+8:C=C+8:IFA>78THENA=6:C=7 200 RETURN 205 A=A-8:C=C-8:IFA<6THENA=78:C=79 210 RETURN 215 B=B-8:D=D-8:IFB<6THENB=6:D=7 220 RETURN 225 B=B+8:D=D+8:IFB>46THENB=6:D=7 230 RETURN 235 A1=INT(A/8):B1=INT(B/8):IFB(A1,B1)=1THEN255 240 R=R(R1):FORZ=0TO3 245 M=P(R,R1,Z,0):N=P(R,R1,Z,1) 250 IFB(M+A1,N+B1)=0THENNEXT:GOTO265 255 IFE>=11THENGOSUB480 260 PRINT@280,"Pc. Won't Fit";:FORZ=1TO1500:NEXT:PRINT@280,SPACE$(13);:GOTO100 265 FORZ=0TO3 270 M=P(R,R1,Z,0):N=P(R,R1,Z,1) 275 B(M+A1,N+B1)=1 280 NEXTZ:B(A1,B1)=1 285 MID$(A$,R2,1)=" " 290 ONR(R1)+1GOSUB310,375 295 A=A-4:B=B-4:LINE(A,B)-(A,B):READC,D 300 READC,D:IFC=0ANDD=0THENLINE-(A,B):GOSUB440:E=E+1:IFE<12THEN100ELSEPRINT@100,"You Did It ! !":PRINT@140,"Congratulations":END 305 LINE-(A+C*8,B+D*8):GOTO300 310 ONR2GOSUB315,320,325,330,335,340,345,350,355,360,365,370:RETURN 315 RESTORE535:RETURN 320 RESTORE540:RETURN 325 RESTORE545:RETURN 330 RESTORE550:RETURN 335 RESTORE555:RETURN 340 RESTORE560:RETURN 345 RESTORE565:RETURN 350 RESTORE570:RETURN 355 RESTORE575:RETURN 360 RESTORE580:RETURN 365 RESTORE585:RETURN 370 RESTORE590:RETURN 375 ONR2GOSUB380,385,390,395,400,405,410,415,420,425,430,435:RETURN 380 RESTORE595:RETURN 385 RESTORE600:RETURN 390 RESTORE605:RETURN 395 RESTORE610:RETURN 400 RESTORE615:RETURN 405 RESTORE620:RETURN 410 RESTORE625:RETURN 415 RESTORE630:RETURN 420 RESTORE635:RETURN 425 RESTORE640:RETURN 430 RESTORE645:RETURN 435 RESTORE650:RETURN 440 RESTORE655:FORZ=65TO76 445 IFP$="F"THENLINE(226,2)-(234,42),0,BF:LINE(199,24)-(239,32),0,BF:RETURN 450 READA,B,C,D:IFASC(P$)=ZTHENLINE(A,B)-(C,D),0,BF:RETURN 455 NEXT 460 IFERL=185THENRESUMENEXT 465 IFERL=250THENPRINT@280,"Off the Board";:FORZ=1TO1500:NEXT:PRINT@280,SPACE$(13);:RESUME100ELSEPRINTERR;ERL:STOP 470 PRINT@280,"Sure? Y/N ";:S$=INPUT$(1) 475 IFS$="Y"THENRUN10ELSEPRINT@280,SPACE$(10);:RETURN 480 FORX=1TO0STEP-1 485 FORY=0TO5 490 FORZ=0TO9 495 M=Z*8+3:N=Y*8+3 500 IFB(Z,Y)=0THENLINE(M,N)-(M+6,N+6),X,BF 505 NEXTZ,Y 510 FORW=1TO2000*X:NEXTW 515 NEXTX:RETURN 520 READA,B:LINE(A,B)-(A,B) 525 READC,D:IFC=0ANDD=0THENLINE-(A,B):READC,D:PRINT@C,CHR$(D);:READC,D:LINE(C,D)-(C+1,D+1),1,B:RETURN 530 LINE-(A+C*8,B+D*8):GOTO525 535 DATA87,10,1,0,1,-1,2,-1,2,0,3,0,3,1,2,1,2,2,1,2,1,1,0,1,0,0,56,65,91,13 540 DATA114,2,2,0,2,1,3,1,3,3,2,3,2,2,1,2,1,1,0,1,0,0,102,66,118,5 545 DATA141,10,2,0,2,-1,3,-1,3,2,2,2,2,1,0,1,0,0,25,67,145,13 550 DATA168,10,1,0,1,-1,2,-1,2,1,3,1,3,2,1,2,1,1,0,1,0,0,71,68,172,13 555 DATA196,2,3,0,3,1,2,1,2,2,0,2,0,0,74,69,199,5 560 DATA226,2,1,0,1,5,0,5,0,0,118,70,229,5 565 DATA90,37,2,0,2,-1,4,-1,4,0,3,0,3,1,0,1,0,0,178,71,93,40 570 DATA126,37,1,0,1,2,3,2,3,3,0,3,0,0,223,72,129,40 575 DATA154,37,1,0,1,1,3,1,3,3,2,3,2,2,0,2,0,0,307,73,157,40 580 DATA89,47,1,0,1,1,4,1,4,2,0,2,0,0,298,74,92,50 585 DATA184,37,2,0,2,1,1,1,1,2,2,2,2,3,0,3,0,0,271,75,187,40 590 DATA206,53,1,0,1,-1,2,-1,2,0,4,0,4,1,0,1,0,0,276,76,209,56 595 DATA87,10,1,0,1,-1,2,-1,2,0,3,0,3,1,2,1,2,2,1,2,1,1,0,1,0,0,56,65,91,13 600 DATA114,10,1,0,1,-1,3,-1,3,0,2,0,2,1,1,1,1,2,0,2,0,0,102,66,118,13 605 DATA141,2,1,0,1,1,3,1,3,2,1,2,1,3,0,3,0,0,26,67,144,5 610 DATA168,18,1,0,1,-2,2,-2,2,-1,3,-1,3,0,2,0,2,1,0,1,0,0,68,68,171,21 615 DATA196,2,3,0,3,2,1,2,1,1,0,1,0,0,75,69,199,5 620 DATA199,24,5,0,5,1,0,1,0,0,118,70,202,27 625 DATA87,29,2,0,2,1,4,1,4,2,1,2,1,1,0,1,0,0,176,71,90,32 630 DATA126,53,2,0,2,-2,3,-2,3,1,0,1,0,0,222,72,129,56 635 DATA154,45,2,0,2,-1,3,-1,3,1,1,1,1,2,0,2,0,0,308,73,157,48 640 DATA90,55,3,0,3,-1,4,-1,4,1,0,1,0,0,297,74,93,58 645 DATA183,37,2,0,2,3,0,3,0,2,1,2,1,1,0,1,0,0,232,75,186,40 650 DATA204,53,2,0,2,-1,3,-1,3,0,4,0,4,1,0,1,0,0,277,76,207,56 655 DATA87,2,111,26,114,2,139,26,141,0,166,26,168,2,193,26,196,2,220,18,0,0,0,0 660 DATA87,29,122,45,126,37,150,62,154,37,178,62,89,47,122,63,183,37,200,61,204,45,239,61 665 DATA1,-1,1,0,2,0,1,1,1,0,1,1,2,1,2,2,1,0,2,0,2,-1,2,1,1,-1,1,0,1,1,2,1,1,0,2,0,0,1,1,1,0,1,0,2,0,3,0,4 670 DATA1,0,2,0,2,-1,3,-1,0,1,0,2,1,2,2,2,0,1,1,1,2,1,2,2,0,1,1,1,2,1,3,1,1,0,0,1,0,2,1,2,1,0,1,-1,2,0,3,0 675 DATA1,-1,1,0,2,0,1,1,0,1,1,0,1,-1,2,-1,0,1,0,2,1,1,2,1,1,0,1,-1,1,-2,2,-1,1,0,2,0,1,1,2,1,1,0,2,0,3,0,4,0 680 DATA1,0,1,1,2,1,3,1,1,0,2,0,2,-1,2,-2,0,1,1,0,2,0,2,-1,1,0,2,0,3,0,3,-1,1,0,1,1,1,2,0,2,1,0,2,0,2,-1,3,0 685 CLS:PRINT"Use Upper Case ONLY":PRINT:PRINT"Object is to fit the 12 pieces into the rectangle with no space left unused." 690 PRINT"Piece to be played is selected by its letter (A to L)":GOSUB750 695 CLS:PRINT"Each piece has a small square used for locating on the playing area."; 700 PRINT" Pieces can be reversed when prompted except for A (no change) and F (90 degree rotation). ":GOSUB750 705 CLS:PRINT"After selection a square will appear on the board which is moved by using the 4 arrow keys. "; 710 PRINT"After selecting a location on the board, the piece is placed with its square "; 715 PRINT"in the same location as the board square by pressing ENTER.":GOSUB750 720 CLS:PRINT"Pieces cannot be placed where they won't fit or outside of the border." 725 PRINT"The following can also be be used at the'Sel. Piece' prompt:" 730 PRINT" M end game-return to MENU":PRINT" N start NEW game":PRINT" O review spaces still OPEN":GOSUB750 735 CLS:PRINT"Once placed, a piece cannot be moved. If a piece is selected and not placed it can be changed "; 740 PRINT"by placing it in a posi- tion it won't fit. You can then select another piece or rotate the curent piece" 745 PRINT@287,"Press any key to start ";:S$=INPUT$(1):RETURN 750 PRINT@287,"Press any key to continue ";:S$=INPUT$(1):RETURN