5 CLS:PRINT@284,"Do You Want Instructions Y/N ";:S$=INPUT$(1):IFS$="Y"ORS$="y"THENGOSUB685 10 CLS:DEFINTA-Z:PRINT@282,"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(10,10)-(110,70),1,B 60 FORZ=20TO60STEP10 65 FORY=20TO100STEP10 70 PSET(Y,Z) 75 NEXTY,Z 80 RESTORE535 85 FORZ=1TO12 90 GOSUB520 95 NEXT 100 PRINT@360,"Select 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@400,"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=55:B=35:C=56:D=36 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+10:C=C+10:IFA>105THENA=15:C=16 200 RETURN 205 A=A-10:C=C-10:IFA<15THENA=105:C=106 210 RETURN 215 B=B-10:D=D-10:IFB<15THENB=65:D=66 220 RETURN 225 B=B+10:D=D+10:IFB>65THENB=15:D=16 230 RETURN 235 A1=INT(A/10)-1:B1=INT(B/10)-1: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@400,"Piece Won't Fit":FORZ=1TO1500:NEXT:PRINT@400,SPACE$(15):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-5:B=B-5:LINE(A,B)-(A,B):READC,D 300 READC,D:IFC=0ANDD=0THENLINE-(A,B):GOSUB440:E=E+1:IFE<12THEN100ELSEPRINT@360,"You Did It ! !":PRINT"Congratulations":END 305 LINE-(A+C*10,B+D*10):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(189,71)-(239,81),0,BF:LINE(213,45)-(223,95),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@400,"Outside of Border":FORZ=1TO1500:NEXT:PRINT@400,SPACE$(17):RESUME100ELSEPRINTERR;ERL:STOP 470 PRINT@400,"Are You Sure Y/N ";:S$=INPUT$(1) 475 IFS$="Y"THENRUN10ELSEPRINT@400,SPACE$(16):RETURN 480 FORX=1TO0STEP-1 485 FORY=0TO5 490 FORZ=0TO9 495 M=Z*10+11:N=Y*10+11 500 IFB(Z,Y)=0THENLINE(M,N)-(M+8,N+8),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*10,B+D*10):GOTO525 535 DATA120,20,1,0,1,-1,2,-1,2,0,3,0,3,1,2,1,2,2,1,2,1,1,0,1,0,0,102,65,124,24 540 DATA160,10,2,0,2,1,3,1,3,3,2,3,2,2,1,2,1,1,0,1,0,0,109,66,164,14 545 DATA200,20,2,0,2,-1,3,-1,3,2,2,2,2,1,0,1,0,0,157,67,204,24 550 DATA120,60,1,0,1,-1,2,-1,2,1,3,1,3,2,1,2,1,1,0,1,0,0,302,68,124,64 555 DATA160,50,3,0,3,1,2,1,2,2,0,2,0,0,308,69,164,54 560 DATA213,45,1,0,1,5,0,5,0,0,396,70,217,49 565 DATA0,107,2,0,2,-1,4,-1,4,0,3,0,3,1,0,1,0,0,524,71,4,111 570 DATA44,97,1,0,1,2,3,2,3,3,0,3,0,0,568,72,48,103 575 DATA80,97,1,0,1,1,3,1,3,3,2,3,2,2,0,2,0,0,577,73,84,103 580 DATA120,100,1,0,1,1,4,1,4,2,0,2,0,0,583,74,124,104 585 DATA170,90,2,0,2,1,1,1,1,2,2,2,2,3,0,3,0,0,549,75,174,94 590 DATA199,110,1,0,1,-1,2,-1,2,0,4,0,4,1,0,1,0,0,597,76,203,114 595 DATA120,20,1,0,1,-1,2,-1,2,0,3,0,3,1,2,1,2,2,1,2,1,1,0,1,0,0,102,65,124,24 600 DATA160,20,1,0,1,-1,3,-1,3,0,2,0,2,1,1,1,1,2,0,2,0,0,109,66,164,24 605 DATA200,10,1,0,1,1,3,1,3,2,1,2,1,3,0,3,0,0,154,67,204,14 610 DATA120,70,1,0,1,-2,2,-2,2,-1,3,-1,3,0,2,0,2,1,0,1,0,0,302,68,124,74 615 DATA160,50,3,0,3,2,1,2,1,1,0,1,0,0,309,69,164,54 620 DATA189,71,5,0,5,1,0,1,0,0,398,70,194,76 625 DATA0,97,2,0,2,1,4,1,4,2,1,2,1,1,0,1,0,0,522,71,4,103 630 DATA44,117,2,0,2,-2,3,-2,3,1,0,1,0,0,571,72,48,121 635 DATA80,107,2,0,2,-1,3,-1,3,1,1,1,1,2,0,2,0,0,616,73,84,111 640 DATA120,110,3,0,3,-1,4,-1,4,1,0,1,0,0,583,74,124,114 645 DATA170,90,2,0,2,3,0,3,0,2,1,2,1,1,0,1,0,0,590,75,174,94 650 DATA199,110,2,0,2,-1,3,-1,3,0,4,0,4,1,0,1,0,0,557,76,203,114 655 DATA120,10,150,40,160,10,190,40,200,10,230,40,120,50,150,80,160,50,190,70,0,0,0,0 660 DATA0,97,40,117,44,97,74,127,80,97,110,127,120,100,160,120,170,90,190,120,199,100,239,120 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:PRINT"Piece to be played is selected by its letter (A to L)":PRINT 695 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). " 705 PRINT@567,"Press any key to continue ";:S$=INPUT$(1) 710 CLS:PRINT"After selection a square will appear on the board which is moved by using the 4 arrow keys. "; 715 PRINT"After selecting a location on the board, the piece is placed with its square "; 720 PRINT"in the same location as the board square by pressing ENTER. "; 725 PRINT"Pieces cannot be placed where they won't fit oroutside of the border":PRINT 730 PRINT"The following can also be be used at the'Select Piece' prompt:" 735 PRINT" M end game-return to MENU":PRINT" N start NEW game":PRINT" O review spaces still OPEN" 740 PRINT@567,"Press any key to continue ";:S$=INPUT$(1):CLS 745 PRINT"Once placed, a piece cannot be moved. If a piece is selected and not placed it can be changed "; 750 PRINT"by placing it in a posi- tion it won't fit. You can then select another piece or rotate the curent piece" 755 PRINT@567,"Press any key to start ";:S$=INPUT$(1):RETURN