:"ChessSet AxesOff CoordOff ClrHome 0->Xmin 94->Xmax ~62->Ymin 0->Ymax Lbl B Menu("Program Mode:","Setup ChessNut",C,"Save a Game",SG,"Draw Picture",D,"Instructions",I,"Quit",Q Lbl C ClrDraw 1->E 0->R 0->C 0->B 7->Z 0->P " "->Str1 UnArchive L6 If dim(L6)=4 Then If not(L6(4) Then L6(3)->S If S=~1 Menu("Continue Game?","Yes",Y1,"No",N1 End End Lbl N1 1->B 0->S Lbl Y1 If S=~1 Then UnArchive [J] UnArchive |LWR UnArchive |LWC UnArchive |LW UnArchive |LWK UnArchive |LBR UnArchive |LBC UnArchive |LB UnArchive |LBK UnArchive |LN UnArchive |LO End If not(B Then If S=~1 and dim(L6)=4 Then L6(1)->T L6(2)->C End Goto E End {8,8}->dim([J] {~2,~1,0,0,0,0,1,2}->L1 {~3,~1,0,0,0,0,1,3}->L2 {~4,~1,0,0,0,0,1,4}->L3 {~5,~1,0,0,0,0,1,5}->L4 {~6,~1,0,0,0,0,1,6}->L5 List>matr(L1,L2,L3,L4,L5,L3,L2,L1,[J] ClrAllLists {0}->|LN {0}->|LO {0}->|LWR {0}->|LWC {0}->|LW {0}->|LBR {0}->|LBC {0}->|LB 1->T Lbl E DelVar B ClrHome Output(1,1,"Your calculator is now ready forChess Nut. Pause ClrHome Stop Lbl SG T->L6(1) C->L6(2) ~1->L6(3) 0->L6(4) Archive L6 Archive [J] Archive |LWR Archive |LWC Archive |LW Archive |LWK Archive |LBR Archive |LBC Archive |LB Archive |LBK Archive |LN Archive |LO StorePic 3 Archive Pic3 Goto B Lbl I 1->P 0->theta Lbl I1 ClrDraw If P=1 Then Text(0,6,"Instructions for ChessNut Line(0,~7,94,~7 Text(8,4,"To use these instructions, Text(14,0,"press 'Enter' to go to the Text(20,0,"next page and 'Clear' to go Text(26,0,"back. Press 'Mode' ('Quit')" Text(32,0,"to go to the start menu. Text(56,91,"1 End If P=2 Then Text(0,91,"2 Text(6,0,"-ChessSet has 4 modes: Text(12,4,"1)Setup ChessNut-to setup Text(18,8,"a ChessNut game. Text(24,4,"2)Save a Game-to save a Text(30,8,"previous game. Text(36,4,"3)Draw Picture-to recover Text(42,8,"pictures ('Recover Game' Text(48,8,"draws a saved game). Text(54,4,"4)Instructions-a manual. End If P=3 Then Text(0,91,"3 Text(0,32,"Gameplay Text(6,0,"-Start ChessNut. Text(12,0,"-When the screen displays Text(18,4,"'White,' the game is ready. Text(24,0,"-Don't press 'Alpha!' Text(30,0,"-Type in piece column, then Text(36,4,"piece row. Text(42,0,"-When 'OK?' appears, press Text(48,4,"'Enter' to continue and Text(54,4,"'Clear' to try again. End If P=4 Then Text(0,91,"4 Text(6,0,"-Type in move column and Text(12,4,"move row. Text(18,0,"-When 'OK?' appears, press Text(24,4,"'Enter' or 'Clear.' Text(30,0,"-Enjoy the game! End 0->theta While theta!=22 and theta!=45 and theta!=105 getKey->theta End If theta=22 Goto B If theta=45 P-1->P If theta=105 P+1->P If P=0 4->P If P=5 1->P Goto I1 Lbl D ClrDraw 0->A 1->B Menu("Select a Picture","Title Screen",D1,"Initial Board",D2,"Recover Game",D4 Lbl D1 Line(8,~3,5,~3 Pt-On(4,~4 Pt-On(3,~5 Line(2,~6,2,~9 Pt-On(3,~10 Pt-On(4,~11 Line(5,~12,8,~12 Line(10,~3,10,~12 Line(15,~3,15,~12 Line(11,~7,14,~7 Line(22,~3,17,~3 Line(17,~4,17,~11 Line(17,~12,22,~12 Line(18,~7,20,~7 Pt-On(29,~4 Line(28,~3,25,~3 Line(24,~4,24,~6 Line(25,~7,28,~7 Line(29,~8,29,~11 Line(28,~12,25,~12 Pt-On(24,~11 Pt-On(36,~4 Line(35,~3,32,~3 Line(31,~4,31,~6 Line(32,~7,35,~7 Line(36,~8,36,~11 Line(35,~12,32,~12 Pt-On(31,~11 Line(10,~16,10,~25 Line(10,~16,15,~25 Line(15,~25,15,~16 Line(17,~16,17,~23 Pt-On(18,~24 Line(19,~25,20,~25 Pt-On(21,~24 Line(22,~23,22,~16 Line(24,~16,28,~16 Line(26,~17,26,~25 Text(0,43,"Rook Text(6,43,"Knight Text(12,43,"Bishop Text(19,43,"Queen Text(26,43,"King Text(33,43,"Pawn Text(40,67,"B W B W Text(47,67,"B=Black Text(54,67,"W=White For(I,79,94 Line(I,0,I,~39 End 67->C Lbl D5 Line(C-1,~2,C-1,~5,B Line(C,~3,C,~5,B Line(C+1,~2,C+1,~5,B Line(C+2,~3,C+2,~5,B Line(C+3,~2,C+3,~5,B Line(C,~9,C,~11,B Line(C+1,~8,C+1,~11,B Line(C+2,~7,C+2,~11,B Line(C+3,~7,C+3,~9,B Line(C,~16,C,~18,B Line(C+1,~13,C+1,~18,B Line(C+2,~16,C+2,~18,B Line(C,~14,C+2,~14,B Line(C,~20,C+2,~20,B Line(C,~22,C+2,~22,B Line(C,~24,C+2,~24,B Line(C,~25,C+2,~25,B Line(C+1,~20,C+1,~23,B Line(C,~27,C+2,~27,B Line(C,~28,C+2,~28,B Pt-Change(C+1,~29 Line(C,~30,C+2,~30,B Line(C,~31,C+2,~31,B Line(C,~32,C+2,~32,B Line(C+1,~35,C+2,~35,B Line(C,~36,C+3,~36,B Line(C,~37,C+3,~37,B If C=67 Then 74->C Else Line(2,~54,4,~54 Pt-On(5,~55 Line(6,~56,6,~58 Pt-On(5,~59 Line(4,~60,2,~60 Pt-On(1,~59 Line(0,~58,0,~56 Pt-On(1,~55 Line(4,~56,3,~56 Pt-On(2,~57 Line(3,~58,4,~58 Text(54,8,"2010 GMadison Goto M2 End Lbl D6 Line(C-1,~2,C-1,~5,B Line(C+3,~2,C+3,~5,B Line(C,~5,C+2,~5,B Pt-Change(C+1,~2 Pt-Change(C,~3 Pt-Change(C+2,~3 Line(C,~9,C,~10,B Pt-Change(C+1,~8 Line(C,~11,C+1,~11,B Line(C+2,~7,C+3,~7,B Line(C+2,~10,C+2,~11,B Line(C+3,~8,C+3,~9,B Pt-Change(C+1,~13 Pt-Change(C,~14 Pt-Change(C+2,~14 Pt-Change(C+1,~15 Line(C,~16,C,~17,B Line(C+2,~16,C+2,~17,B Line(C,~18,C+2,~18,B Pt-Change(C,~20 Pt-Change(C+2,~20 Pt-Change(C+1,~21 Pt-Change(C,~22 Pt-Change(C+2,~22 Pt-Change(C+1,~23 Pt-Change(C,~24 Pt-Change(C+2,~24 Line(C,~25,C+2,~25,B Line(C,~27,C,~28,B Line(C+2,~27,C+2,~28,B Pt-Change(C+1,~29 Line(C,~30,C,~31,B Line(C+2,~30,C+2,~31,B Line(C,~32,C+2,~32,B Line(C+1,~35,C+2,~35,B Line(C,~36,C,~37,B Line(C+3,~36,C+3,~37,B Line(C+1,~37,C+2,~37,B If C=74 Then 0->B 82->C Goto D6 Else 89->C Goto D5 End Lbl M2 Pause Menu("Store Picture?","Yes",Y,"No",N Lbl Y UnArchive Pic1 StorePic 1 Archive Pic1 Lbl N Goto B Lbl D4 1->A Lbl D2 For(I,0,8 Line(0,~7I,56,~7I Line(7I,0,7I,~56 End For(I,1,8 For(J,1,8 If iPart((I+J)/2)!=(I+J)/2 Then For(K,7I-6,7I-1 Line(7J-6,~K,7J-1,~K End End End End Text(57,2,"A Text(57,9,"B Text(57,16,"C Text(57,23,"D Text(57,30,"E Text(57,37,"F Text(57,44,"G Text(57,51,"H For(I,1,8 9-I->J Text(7(I-1),58,J End Text(0,66,"Piece: Text(14,66,"Move: If not(A Then {~2,~1,0,0,0,0,1,2}->L1 {~3,~1,0,0,0,0,1,3}->L2 {~4,~1,0,0,0,0,1,4}->L3 {~5,~1,0,0,0,0,1,5}->L4 {~6,~1,0,0,0,0,1,6}->L5 List>matr(L1,L2,L3,L4,L5,L3,L2,L1,[J] ClrAllLists Else UnArchive [J] End Lbl D3 For(V,1,8 For(W,1,8 While not([J](V,W) W+1->W If W=9 Then V+1->V 1->W End If V=9 Goto M3 End [J](V,W)>0->H H-1->U If abs([J](V,W))=1 Then Pxl-Change(7V-2,7W-2 Pxl-Change(7V-3,7W-2 Pxl-Change(7V-4,7W-3 Pxl-Change(7V-4,7W-4 Pxl-Change(7V-3,7W-5 Pxl-Change(7V-2,7W-5 Pxl-Change(7V-2,7W-4 Pxl-Change(7V-2,7W-3 If (H and iPart((V+W)/2)!=(V+W)/2) or (U and iPart((V+W)/2)=(V+W)/2 Then Pxl-Change(7V-3,7W-3 Pxl-Change(7V-3,7W-4 End End If abs([J](V,W))=2 Then Pxl-Change(7V-2,7W-2 Pxl-Change(7V-3,7W-2 Pxl-Change(7V-4,7W-2 Pxl-Change(7V-5,7W-2 Pxl-Change(7V-2,7W-3 Pxl-Change(7V-4,7W-3 Pxl-Change(7V-2,7W-4 Pxl-Change(7V-5,7W-4 Pxl-Change(7V-2,7W-5 Pxl-Change(7V-4,7W-5 Pxl-Change(7V-2,7W-6 Pxl-Change(7V-3,7W-6 Pxl-Change(7V-4,7W-6 Pxl-Change(7V-5,7W-6 If (H and iPart((V+W)/2)!=(V+W)/2) or (U and iPart((V+W)/2)=(V+W)/2 Then Pxl-Change(7V-3,7W-3 Pxl-Change(7V-3,7W-4 Pxl-Change(7V-3,7W-5 Pxl-Change(7V-4,7W-4 End End If abs([J](V,W))=3 Then Pxl-Change(7V-1,7W-3 Pxl-Change(7V-1,7W-4 Pxl-Change(7V-1,7W-5 Pxl-Change(7V-2,7W-5 Pxl-Change(7V-3,7W-5 Pxl-Change(7V-4,7W-4 Pxl-Change(7V-5,7W-3 Pxl-Change(7V-5,7W-2 Pxl-Change(7V-4,7W-2 Pxl-Change(7V-3,7W-2 Pxl-Change(7V-2,7W-3 If (H and iPart((V+W)/2)!=(V+W)/2) or (U and iPart((V+W)/2)=(V+W)/2 Then Pxl-Change(7V-2,7W-4 Pxl-Change(7V-3,7W-4 Pxl-Change(7V-3,7W-3 Pxl-Change(7V-4,7W-3 End End If abs([J](V,W))=4 Then Pxl-Change(7V-1,7W-3 Pxl-Change(7V-1,7W-4 Pxl-Change(7V-1,7W-5 Pxl-Change(7V-2,7W-3 Pxl-Change(7V-2,7W-5 Pxl-Change(7V-3,7W-3 Pxl-Change(7V-3,7W-5 Pxl-Change(7V-4,7W-4 Pxl-Change(7V-5,7W-3 Pxl-Change(7V-5,7W-5 Pxl-Change(7V-6,7W-4 If (H and iPart((V+W)/2)!=(V+W)/2) or (U and iPart((V+W)/2)=(V+W)/2 Then Pxl-Change(7V-2,7W-4 Pxl-Change(7V-3,7W-4 Pxl-Change(7V-5,7W-4 End End If abs([J](V,W))=5 Then Pxl-Change(7V-1,7W-3 Pxl-Change(7V-1,7W-4 Pxl-Change(7V-1,7W-5 Pxl-Change(7V-2,7W-3 Pxl-Change(7V-2,7W-5 Pxl-Change(7V-3,7W-4 Pxl-Change(7V-4,7W-3 Pxl-Change(7V-4,7W-5 Pxl-Change(7V-5,7W-4 Pxl-Change(7V-6,7W-3 Pxl-Change(7V-6,7W-5 If (H and iPart((V+W)/2)!=(V+W)/2) or (U and iPart((V+W)/2)=(V+W)/2 Then Pxl-Change(7V-2,7W-4 Pxl-Change(7V-4,7W-4 Pxl-Change(7V-6,7W-4 End End If abs([J](V,W))=6 Then Pxl-Change(7V-1,7W-3 Pxl-Change(7V-1,7W-4 Pxl-Change(7V-1,7W-5 Pxl-Change(7V-2,7W-3 Pxl-Change(7V-2,7W-5 Pxl-Change(7V-3,7W-3 Pxl-Change(7V-3,7W-5 Pxl-Change(7V-4,7W-4 Pxl-Change(7V-5,7W-3 Pxl-Change(7V-5,7W-5 Pxl-Change(7V-6,7W-3 Pxl-Change(7V-6,7W-5 If (H and iPart((V+W)/2)!=(V+W)/2) or (U and iPart((V+W)/2)=(V+W)/2 Then Pxl-Change(7V-2,7W-4 Pxl-Change(7V-3,7W-4 Pxl-Change(7V-5,7W-4 Pxl-Change(7V-6,7W-4 End End End End Lbl M3 Pause Menu("Store Picture?","Yes",YZ,"No",NZ Lbl YZ If A Then StorePic 3 Archive Pic3 Else StorePic 2 Archive Pic2 End Lbl NZ Goto B Lbl Q Stop