_____________________________________________________________________________ Title: PROCRAD TRILOGY Version: 3.01 Since : 04/21/1997 Last update: 05/05/1997 Author: RATTANAM WONGKALASIN - B3703007@POPEYE.SUT.AC.TH Model: Designed on a 9750,9850,9850PLUS,9950,9950 PLUS Description: 3 in 1 game BLACKJACK, POGDENG, BLACKDENG ----------------------------------------------------------------------------- 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: 1000->B "THE PROCARD TRILOGY" "1 POGDENG" "2 BLACKJACK 21TH" "3 BLACKDENG "?->r Lbl 1 r<>2 And r<>3=>1->r Identity 4->Mat A Fill(0,Mat A {1,2,3,4,5,6,7,8,9,10,10,10,10,0->List 4 ClrText " " " " " " Locate 3,1,"NOW U,HAVE MONEY :" B<=0=>Locate 10,3,0 B<=0=>Goto Z 10-Int ((log B)¤2)->A A<1=>1->A Locate A,2,B " " " " Locate 8,4,"[0=EXIT]" Locate 5,5,"['†ˆ¢ = COLOR]" 'optn,F6,F5 and F1,F2,F4 r=1=>Locate 1,7,"POGDENG" r=2=>Locate 1,7,"BLACKJACK" r=3=>Locate 1,7,"BLACKDENG" "U,WANT To BET GAME:"?->A If A=3703007 Then "MONEY"?->B Goto 1 IfEnd A>B Or A<0=>Goto 1 A=0=>Goto Y [[1,1,1,1,1,1,1,1,1,1,1,1,1][1,1,1,1,1,1,1,1,1,1,1,1,1][1,1,1,1,1,1,1,1,1,1,1,1,1][1,1,1,1,1,1,1,1,1,1,1,1,1]]->Mat R For 1->I To 4 Do Int (13Ran#+1->D Int (4Ran#+1->C LpWhile Mat R[C,D]=0 C->Mat A[1,I D->Mat A[2,I 0->Mat R[C,D Next 4->Y Lbl N ClrText " " " " " " " " " " If r<>3 Then Locate 1,1,"YOUR CARD HAVE:" Locate 1,4,"MY CARD HAVE :" Else Locate 1,1,"UR HAND(MY CARD)" Locate 1,4,"MY HAND(UR CARD)" IfEnd For 1->I To Y I=1=>5->V I=1=>2->W I=2=>10->V I=2=>2->W I=3=>5->V I=3=>5->W I=4=>10->V I=4=>5->W I=5=>15->V I=5=>2->W I=6=>15->V I=6=>5->W I<=4=>Mat A[2,I->U I>4=>Mat A[4,I-4->U I=4 And Y=4=>Goto 2 Lbl 3 U=10=>V-1->V U<=10 And U<>0=>Locate V,W,U U=1=>Locate V,W,"A" U=11=>Locate V,W,"J" U=12=>Locate V,W,"Q" U=13=>Locate V,W,"K" 1->M I->N I>4=>3->M I>4=>I-4->N Mat A[M,N->C U=10=>V+1->V C=1=>Locate V+1,W,"'" C=2=>Locate V+1,W,"ˆ" 'optn,F6,F5 and F1 C=3=>Locate V+1,W,"†" 'optn,F6,F5 and F2 C=4=>Locate V+1,W,"¢" 'optn,F6,F5 and F4 Next Y=6=>Goto U Goto 5 Lbl 2 Mat A[2,3->K Mat A[2,4->H List 4[K->K List 4[H->H If r=2 Then H+K->O K=1=>11->K H=1=>11->H IfEnd H+K->H 0->Z 0->S 0->F If r<>2 Then H>=10=>H-10->H H>=10=>H-10->H H<>8=>H<>9=>1->Z Else H<>21=>1->Z IfEnd H->G Mat A[2,1->K Mat A[2,2->H List 4[K->K List 4[H->H r=2=>K=1=>11->K r=2=>H=1=>11->H K+H->H If r<>2 Then H>=10=>H-10->H H>=10=>H-10->H H<>8=>H<>9=>1->S Else H<>21=>1->S IfEnd If Z=1 And S=1 Then Locate 10,5,"?" Goto 5 Else Goto 3 IfEnd Lbl 5 If Z=0 Or S=0 Then If S=Z Then G>H=>1->S H>G=>1->Z H=G=>Locate 1,7,"NOBODY WIN"_ IfEnd If S=1 Then If r<>2 Then Mat A[1,3]=Mat A[1,4]=>2->F Mat A[2,3]=Mat A[2,4]=>2->F If F=2 Then r=1=>Locate 1,7,"I POG And 2 DENG"_ r=3=>Locate 1,7,"U POG And 2 DENG"_ r=3=>-A->A B-2A->B Else r=1=>Locate 1,7,"SORRY,I POG!!"_ r=3=>Locate 1,7,"OH!! YOU POG"_ r=3=>-A->A B-A->B IfEnd Else Locate 1,7,"I BLACKJACK!!"_ B-2A->B IfEnd IfEnd If Z=1 Then If r<>2 Then Mat A[1,1]=Mat A[1,2=>3->F Mat A[2,1]=Mat A[2,2=>3->F If F=3 Then r=1=>Locate 1,7,"YOU POG, 2 DENG"_ r=3=>Locate 1,7,"I POG, 2 DENG"_ r=3=>-A->A B+2A->B Else r=1=>Locate 1,7,"OH!! YOU POG"_ r=3=>Locate 1,7,"SORRY,I POG!!"_ r=3=>-A->A B+A->B IfEnd Else Locate 1,7,"YOU BLACKJACK!!"_ B+2A->B IfEnd IfEnd Goto 1 IfEnd Locate 1,7,"[ENTER 0=YES ELSE=NO]" r<>3=>"U,WANT To OPEN MORE"?->T r=3=>"U,WANT OPEN For ME"?->T {0,0,0,0,0,0->List 1 List 1->List 2 1->I r<>2=>G>=10=>G-10->G r<>2=>G>=10=>G-10->G G=6=>Int (2Ran#+1->I G<6=>2->I T=0=>1->Z T<>0=>2->Z 0->J G>=5=>Mat A[1,3]=Mat A[1,4=>1->J G=5=>J=1=>Int (2Ran#+1->J J<>0=>J->I r<>1=>1->I r=3=>G>=5=>2->I r=2=>O<16=>2->I For Z->J To I Do Int (13Ran#+1->D Int (4Ran#+1->C LpWhile Mat R[C,D]=0 C->Mat A[3,J D->Mat A[4,J Next For 1->I To 2 If I=1 Then 2->C 1->D 1->E IfEnd If I=2 Then 3->C 4->D 2->E IfEnd 0->Z 1->@ If 0=Mat A[3,E Then Mat A[1,C]->Mat A[3,E .5->@ IfEnd Mat A[1,C]=Mat A[1,D]=>Mat A[3,E]=Mat A[1,D]=>1->Z Z=1=>I=1=>@->List 1[2 Z=1=>I=2=>@->List 2[2 @=.5=>0->Mat A[3,E 0->Z Mat A[2,C]=Mat A[2,D]=>Mat A[4,E]=Mat A[2,D]=>1->Z Z=1=>I=1=>1->List 1[1 Z=1=>I=2=>List 2[1 Mat A[2,C->U Mat A[2,D->V Mat A[4,E->W 0->O U>10=>V>10=>W>10=>1->O O=1=>I=1=>1->List 1[6 O=1=>I=2=>1->List 2[6 U=1=>14->U V=1=>14->V W=1=>14->W {U,V,W->List 3 Min(List 3->U Max(List 3->V Mean(List 3->W If V-U=2 Then If W-U=1 Then If W<>0 And U<>0 And V<>0 Then I=1=>1->List 1[3 I=2=>1->List 2[3 IfEnd IfEnd IfEnd Mat A[2,C->U Mat A[2,D->V Mat A[4,E->W W=0=>14->X W<>0=>W->X List 4[U]+List 4[V]+List 4[X->Z Z>=10=>Z-10->Z Z>=10=>Z-10->Z Z>=10=>Z-10->Z I=1=>Z->List 1[4 I=2=>Z->List 2[4 If W=0 Then If List 4[U]=List 4[V Then I=1=>1->List 1[5 I=2=>1->List 2[5 IfEnd IfEnd Next 6->Y Goto N Lbl U If r<>2 Then If List 1[4]>List 2[4 Then 1->List 1[4 0->List 2[4 IfEnd If List 1[4]List 2[4 0->List 1[4 IfEnd If List 1[4]=List 2[4 Then 0->List 1[4 0->List 2[4 IfEnd 32List 1[1]+List 1[2]+16List 1[3]+4List 1[4]+2List 1[5]+8List 1[6->M 8List 2[6]+32List 2[1]+List 2[2]+16List 2[3]+4List 2[4]+2List 2[5->N 0->F 0->L If M>N Then If M>=4 Then r=1=>Locate 17,1,"[WIN]" r=3=>Locate 17,4,"[WIN]" M->F 1->L IfEnd IfEnd M=N=>0->F M=N=>0->L If M=4 Then r=1=>Locate 17,4,"[WIN]" r=3=>Locate 17,1,"[WIN]" N->F 2->L IfEnd IfEnd If F<>0 Then If F=32 Or F=36 Or F=40 Or F=44 Then 5A->A Locate 1,7,"TONG! 5 DENG For GAME"_ IfEnd If F=16 Or F=20 Or F=24 Or F=28 Then 3A->A Locate 1,7,"STEP! 3 DENG For GAME"_ IfEnd If F=17 Or F=21 Or F=25 Or F=29 Then 4A->A Locate 1,7,"STEP,COLOR 4 DENG"_ IfEnd If F=4 Or F=5 Or F=4.5 Then F=4 And O=0=>Locate 1,7,"MAXIMUM SCORE"_ If F=4.5 Or (F=4 And O=1) Then Locate 1,7,"MAX SCORE And 2 DENG"_ 2A->A IfEnd F=5=>Locate 1,7,"MAX SCORE And 3 DENG"_ F=5=>3A->A IfEnd F=6=>2A->A F=6=>Locate 1,7,"MAX And DOUBLE 2 DENG"_ If F=8 Or F=12 Then 2A->A Locate 1,7,"THE SEAN, 2 DENG"_ IfEnd Else Locate 1,7,"NOBODY WIN"_ IfEnd Else Mat A[4,2->F Mat A[2,3->G Mat A[2,4->J F=0=>14->F J=0=>14->J G=0=>14->G 21-List 4[F]-List 4[G]-List 4[J->G Mat A[4,1->J Mat A[2,1->K Mat A[2,2->H J=0=>14->J K=0=>14->K H=0=>14->H 21-List 4[J]-List 4[K]-List 4[H->H 0->L Locate 20,1,21-H Locate 20,4,21-G H=G Or (H<0 And G<0)=>Locate 1,7,"NOBODY WIN"_ If (H=0) Or (H>=0 And G<0) Then Locate 1,7,"YOU WIN!!"_ 1->L H=0=>2A->A IfEnd If (G=0) Or (G>=0 And H<0) Then Locate 1,7,"I WIN!!"_ 2->L G=0=>2A->A IfEnd IfEnd r=3=>-A->A L=1=>B+A->B L=2=>B-A->B Goto 1 Lbl Z " " " NOW,YOU LOST"_ Lbl Y "END OF PROCARD" Stop ==================================== 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