This is my version of the Tic-Tac-Toe game... here you can actually play against the calculator.... It's all compressed into one program, which was a litle tricky. If someone can improve the logic-routine....please do so (I'm out of ideas.) It is written on a CFX-9800G But if you remove the color code, it should work fine with the FX-9700 too... ______________________________________________________________________ Command translation: -> Single arrow (located on the keyboard) => Double arrow (press: [shift] [prgm] [f1] [f1]) _ Display, -Disp- (press: [shift] [prgm] [f4]) <= Less or equal (A <= B) >= Greater or equal (A >= B) <> Not equal (A <> B) ^ Raised to the power of / Division or fraction (explain which with a comment) 2rt() Root (2rt(7) is the square root of 7) 4rt() 4th root pi pi (~3.14159265359, low case) e() e(1) (~2.7818281846 low case) E Exponent (5E4 gives 5*10^4) (located on the keyboard, [EXP]) ______________________________________________________________________ "tic tac toe" Lbl 1 ;Draws the playing board Range 1,4,5,1,4,5 0->N Int 2Ran#->V ;To randomly select who'll start Plot 1,1 Plot 4,1 Line Plot 1,2 Plot 4,2 Line Plot 1,3 Plot 4,3 Line Plot 1,4 Plot 4,4 Line Plot 1,1 Plot 1,4 Line Plot 2,1 Plot 2,4 Line Plot 3,1 Plot 3,4 Line Plot 4,1 Plot 4,4 Line 0->Z Lbl 2 ;Empties the marks on the board 9->a[Z] Z+1->Z Z=10=>Goto 3 Goto 2 Lbl 3 V=1=>Goto 4 ;Lets calculator start (if it's lucky..) "PLACE YOUR MARK" ?->U ;here is the routine for the input... U<1=>Goto 3 U>9=>Goto 3 A[U-1]=2=>Goto 3 A[U-1]=1=>Goto 3 1->A[U-1] 4->V ;Will make the calculator sett next mark U-1->U N+1->N ;registrates a mark Goto 6 Lbl 4 ;This is the computers select routine Int 9Ran#->W A[W]=1=>Goto 4 A[W]=2=>Goto 4 2->A[W] 3->V N+1->N Goto 7 Lbl 5 ;this routine checks if someone's got tic tac toe 0->M A+B+C=3=>Goto 8 A+B+C=6=>Goto 9 D+E+F=3=>Goto 8 D+E+F=6=>Goto 9 G+H+I=3=>Goto 8 G+H+I=6=>Goto 9 A+D+G=3=>Goto 8 A+D+G=6=>Goto 9 B+E+H=3=>Goto 8 B+E+H=3=>Goto 8 C+F+I=3=>Goto 8 C+F+I=3=>Goto 8 A+E+I=3=>Goto 8 A+E+I=3=>Goto 8 C+E+G=3=>Goto 8 C+E+G=3=>Goto 8 N=9=>"NOBODY WON"_ N=9=>Goto 1 V=3=>Goto 3 V=4=>Goto 4 Lbl 6 ;This routin draws the "O" for the player 2.5->Q U<=2=>1.5->Q U>=6=>3.5->Q 1.5->P U=1=>2.5->P U=4=>2.5->P U=7=>2.5->P U=2=>3.5->P U=5=>3.5->P U=8=>3.5->P Green Graph(X,Y)=(0.4sin T+P,0.4cos T+Q ;Note to get the "Graph(X,Y)=(" Goto 5 ;G-type must be PRM/CON Lbl 7 This routine draws the Calculators "x" 2->Q W<=2->1->Q W>=6->3->Q 1->P W=1=>2->P W=4=>2->P W=7=>2->P W=2=>3->P W=5=>3->P W=8=>3->P Graph(X,Y)=(0.10T+P+0.2,0.10T+Q+0.2 Graph(X,Y)=(-0.10T+0.8+P,0.10T+Q+0.2_ Goto 5 Lbl 8 "You Won"_ Goto 1 Lbl 9 "I Won"_ Goto 1 Lbl 0 ;This is the logic routine....but it not very good... M+1->M ;If anyone got any ideas.....let me know... M=32=>Goto 4 Int 6Ran#->O A[O+2]=1=>Goto 0 A[O+2]=2=>Goto 0 A[O]=A[O+1]=>O+2->W A[O]=A[O+1]=>3->V A[O]=A[O+1]=>N+1->N A[O]=A[O+1]=>Goto 7 Goto 0 --- That should be it...(hope I got it all right).. The numbers 1-9 represents the playing board. Have fun Any comments can be E-mailed to me at lars.nygaard@hig.no