_____________________________________________________________________________ Title: Nannan-T Version: 2.03 Since : 05/03/1997 Last update: 05/12/1997 Author: RATTANAM WONGKALASIN - B3703007@POPEYE.SUT.AC.TH Model: Designed on a 9750,9850,9850PLUS,9950,9950 PLUS Description: 2 in 1 game Towers of hanoi and Paged power -towers of hanoi- you must move number in block A to block C but you can move to block B ,you can not move big number to smaller (Exam 3 can not on 1) this game have 6 level B step |4| | | | | | 1. select block "move from" use cursor in line A,B,or C ENTER |3| | | | | A---|---C 2. select block "move to" use cursor in line A,B,or C ENTER |2| | | | | | |1| | | | | RE =return A B C NE=new EX=exit -paged power- move pag until have one pag in board u can "jump" up-down-left-right over other pag and remove that pag out step 1. use arrow key to move cursor in board and EXE to select pag 2. move up-down-left-right on menu line where direction u will jump ----------------------------------------------------------------------------- COMMAND TRANSLATION: # "display" (SHIFT, VAR, F5) <> "not equal to" (SHIFT, VAR, F6, F3, F2) <= "less than or equal to"(SHIFT, VAR, F6, F3, F6) >= "more than or equal to"(SHIFT, VAR, F6, F3, F5) -> "put in to" => "then" (SHIFT, VAR, F3, F3) Ran# gives a random number. (OPTN, F6, F3, F4) / divide ----------------------------------------------------------------------------- PROGRAM CODE: Filename:NanNan-T 3->Ð Prog "GU" Locate 7,2,"NAnnAN-T" Locate 14,4,"2.03" Locate 11,6,"03/05/97" 1->Ð Prog "GU" V-window 1,127,0,1,63,0 Cls Norm Coordoff "SeLeCT GaME" "1.TowERs oF HaNOi" "2.PaGeD PoWeR "?->Z Z<>2=>1->Z 10->A 80->B 20->C 60->D 50->E 30->F 40->G 70->H 100->Q 110->J 90->K If Z<>2 Then F-Line A,A,B,A F-Line A,9,B,9 F-Line C,A,C,D F-Line C,D,F,D F-Line F,D,F,A F-Line G,A,G,D F-Line G,D,E,D F-Line E,D,E,A F-Line D,A,D,D F-Line D,D,H,D F-Line H,D,H,A 48->M Text M,16,"A" Text M,36,"B" Text M,56,"C" Text 35,97,"RE" Text 22,86,"A" Text 22,113,"C" Text 9,Q,"B" Text 5,2,"TiME" Else Text 35,97,"DN" Text 9,97,"UP" Text 22,113,"RG" Text 22,B,"LF" For 1->O To 8 O<=4=>F-Line 8,18+7O,64,18+7O O<=4=>F-Line 16+8O,11,16+8O,D F-Line 8O,25,8O,46 F-Line 24,7O+4,48,7O+4 Next IfEnd F-Line K,G,J,G F-Line Q,F,Q,E F-Line K,C,J,C F-Line J,C,J,A F-Line J,A,K,A F-Line K,A,K,C F-Line Q,A,Q,C Text 47,101,"EX" Text 47,91,"NE" Text 1,B,"LEveL:" 0->A~Y 100->Q Do Lbl N 0->P Identity 8->Mat A Fill(0,Mat A If Z<>2 Then {L+2,0,0->List 1 For 1->A To L+2 L+3-A->Mat A[1,A Next For 1->V To L+2 Mat A[1,V->A A<>0=>Text 54-6V,24,A Text 54-6V,44," " Text 54-6V,64," " Next Text 15,8," " Text 1,104," " Else 0->A L=6=>2->A Fill(A,Mat A For 1->A To 2 For 1->B To 2 1->Mat A[A,B 1->Mat A[A+5,B 1->Mat A[A,B+5 1->Mat A[A+5,B+5 Next Next If L=0 Then For 2->A To 5 2->Mat A[A,4 Next For 3->A To 5 2->Mat A[3,A Next IfEnd If L=1 Then For 2->A To 6 2->Mat A[4,A 2->Mat A[A,4 Next IfEnd If L=2 Then For 3->A To 5 For 1->B To 4 2->Mat A[B,A Next Next IfEnd If L=3 Or L=4 Or L=5 Then For 0->A To 2 1->C L=4=>2->C 2->Mat A[A+C,4 L=5=>2->Mat A[7-A,4 For 1->B To A 2->Mat A[A+C,4-B 2->Mat A[A+C,4+B L=5=>2->Mat A[7-A,4-B L=5=>2->Mat A[7-A,4+B Next Next If L=3 Then For 4->A To 7 2->Mat A[A,4 Next For 3->A To 5 2->Mat A[6,A 2->Mat A[7,A Next IfEnd If L=4 Then For 2->A To 6 2->Mat A[4,A Next For 1->A To 7 2->Mat A[5,A Next IfEnd If L=5 Then For 1->A To 7 2->Mat A[4,A Next IfEnd IfEnd L=6 Or L=5 Or L=2=>0->Mat A[4,4 For 3->I To 5 For 1->J To 7 Mat A[I,J->A A=2=>Text 7I-2,3+8J,0 A=0=>Text 7I-2,3+8J," " Next For 1->K To 2 Mat A[K,I->A A=2=>Text 7K-2,3+8I,0 A=0=>Text 7K-2,3+8I," " Mat A[K+5,I->A A=2=>Text 33+7K,3+8I,0 A=0=>Text 33+7K,3+8I," " Next Next IfEnd Text 1,105,L 0->D 0->U Lbl 1 Text 57,1," " Z=2=>Goto 9 Text 15,8,U D=0=>Text 57,1,"MovE FroM BloCk" D=1=>Text 57,1,"MOVe To BLoCk" Lbl 8 PlotOn Q,40 S=1=>Plot Q,15_ S<>1=>Plot Q,40_ 0->K If Abs (X-Q)<=10 And Abs (Y-40)<=10 Then If X=Q Then Y>40=>2->K Y<40=>4->K IfEnd If Y=40 Then X>Q=>3->K X1->K IfEnd IfEnd If K=0 Then If Abs (X-Q)<=10 Then If Y>10 And Y<20 Then X>Q=>6->K X5->K IfEnd IfEnd IfEnd Z=2=>X=Q=>Y=40=>Goto 9 K=0=>Goto 8 S=1=>K<5=>Goto 8 0->S K=6=>Goto Z Z=2=>Goto 7 K>3=>Goto 2 If D=0 And 0=Mat A[K,1 Then Text 57,1,"Can Not MovE EmPTy BLoCK"_ Goto 1 IfEnd If D=1 And List 1[K]>0 Then List 1[K->A Mat A[K,A->M If M<=O Then M=O=>Text 57,1,"CAN Not MOVE iTSELF"_ MText 57,1,"Not MOVE BIGGER ON SMALLER"_ 0->D Goto 1 IfEnd IfEnd If D=0 Then List 1[K->A Mat A[K,A->O K->F IfEnd If D=1 Then List 1[F->A A-1->List 1[F 0->Mat A[F,A Text 54-6A,20F+4," " List 1[K->A A+1->A A->List 1[K O->Mat A[K,A Text 54-6A,20K+4,O Isz U If 1=Mat A[3,L+2 Then If L<>8 Then Text 57,1,"VeRY GOOD YOU WiN!" L+1->L L=7=>Goto W Goto N Else Goto W IfEnd IfEnd IfEnd D+1->D D=2=>0->D Lbl 2 K<4=>Goto 1 K=4=>0->D K=4=>Goto 1 LpWhile L<=6 Lbl Z 2->Ð Prog "GU" Locate 7,2,"NanNAN-T" Locate 11,5,"12/05/97" Stop Lbl W Text 57,1,"CongrAtULaTION,YoU WiN! HERO"_ Goto Z Lbl 9 0->S PlotOn 8,25 Plot 36,35_ For 1->I To 7 X>8I And X<8+8I=>I->A Y>7I+4 And Y<7I+11=>8-I->B Next A>7 Or A<1 Or B>7 Or B<1=>Goto 9 2<>Mat A[B,A=>Goto 9 Goto 8 Lbl 7 If K=2 Then B<3=>Goto 9 B-1->C A->D B-2->E A->F Mat A[E,F]<>0 Or 2<>Mat A[C,D=>Goto 9 2->Mat A[E,F 0->Mat A[C,D IfEnd If K=1 Then A<3=>Goto 9 B->C A-1->D B->E A-2->F Mat A[E,F]<>0 Or 2<>Mat A[C,D=>Goto 9 2->Mat A[E,F 0->Mat A[C,D IfEnd If K=4 Then B>5=>Goto 9 A->D B+1->C A->F B+2->E Mat A[E,F]<>0 Or 2<>Mat A[C,D=>Goto 9 2->Mat A[E,F 0->Mat A[C,D IfEnd If K=3 Then A>5=>Goto 9 B->C B->E A+1->D A+2->F Mat A[E,F]<>0 Or 2<>Mat A[C,D=>Goto 9 2->Mat A[E,F 0->Mat A[C,D IfEnd K=5=>Goto N 0->Mat A[B,A Text 7B-2,8A+3," " Text 7C-2,8D+3," " Text 7E-2,8F+3,0 0->V For 3->J To 5 For 1->I To 7 0->A~H Mat A[J,I->M If M=2 Then 1->N Goto T Lbl U IfEnd Next Next For 3->I To 5 For 1->K To 4 0->A~H K->J K>2=>K+3->J Mat A[J,I->M If M=2 Then 2->N Goto T Lbl V IfEnd Next Next V=1=>L=6=>Goto W V=1=>Text 57,1,"* YoU Win,GOOD *" V=1=>L+1->L V=1=>Goto N V<>1=>Text 57,1,"##..GaMe OVeR..##" 1->S Goto 8 Lbl T V+1->V I<6=>Mat A[J,I+1->A I<6=>Mat A[J,I+2->B I>2=>Mat A[J,I-1->C I>2=>Mat A[J,I-2->D J<6=>Mat A[J+1,I->E J<6=>Mat A[J+2,I->F J>2=>Mat A[J-1,I->G J>2=>Mat A[J-2,I->H (M=A And B=0) Or (M=C And D=0) Or (M=E And F=0) Or (M=G And H=0)=>Goto 9 N=1=>Goto U Goto V ==================================== My Casio 9850 Game 1 IQMAX -My BEST CASIO CFX-9850 Game 2 XO-GOLD -Best of tic tac tae Game 3 PROCARD -3 in 1 game BLACKJACK, POGDENG, BLACKDENG 4 PUZZLE -Easy to write program but not easy to play 5 MINS SWEEPER -Same for win, Good game 6 CONFUSION -Same for win, Good game for test you memmory 7 HORSE RACING -Fun game 8 CALENDAR -9999 year Calendar viewer 9 NANNAN-T -2 in 1 game TOWERS OF HANOI and PAGED POWER 10 AND MORE... ======================================= Thank for Den Thana -idea for PROCARD P'_Peak -original 9700 HORSE RACING and CROSS THINK ,YO ,EAK ,UOD, BEE and more for test my games AOD -for "make and test" Casio-to-Casio Cable and Casio-to-PC interface NY R-COM -for idea and technical (C) 1997 By Rattanam wongkalasin -NarM- Telecom Eng. SUT Thailand