Three's A Match! v1.1 By TI Software 4/98 http://www.geocities.com/siliconvalley/peaks/1062/ Comments/Questions/etc. are extremely welcomed and can be sent to: tisoftware@theoffice.net This is a text-based game for the TI81* graphing calculator in which you have to guess the three numbers, in order, that were randomly picked by the computer. The table below shows your winnings for how many numbers you guess right. Your score is reset to zero each time you start the program. Numbers right|Points earned --------------------------- 0 | 0 --------------------------- 1 | 10 --------------------------- 2 | 25 --------------------------- 3 | 60 --------------------------- *It will probably working for other TI-XX models, but it might need minor changes to do so. Start of code: Anything in {}'s are comments and should NOT be typed in!!! This is a comment------ | \START81\ | \NAME=3.EXE | \FILE=THREES.PRG | 0/->/[theta] {press ALPHA - 3} ClrHome Disp "THREES A MATCH!" Disp "V1.1 BY TI" Disp "SOFTWARE 4/26/98" Disp "" {blank line} Disp "Press Enter..." Pause Lbl R Int (Rand9)+1/->/A {/->/ is the character produced by the STO> button} Int (Rand9)+1/->/B {/->/ is the character produced by the STO> button} Int (Rand9)+1/->/C {/->/ is the character produced by the STO> button} 100A+10B+C/->/D {/->/ is the character produced by the STO> button} Lbl P ClrHome Disp "1ST NUMBER" Input X If X=cos 7 {Built-in cheat - shows computer's numbers!!!} Goto C Int X/->/X {/->/ is the character produced by the STO> button} If X=0 {zero} Goto Q If X>9 {greater than} Goto P If X<1 {less than} Goto P Disp "2ND NUMBER" Input Y Int Y/->/Y {/->/ is the character produced by the STO> button} If Y>9 {greater than} Goto P If Y<1 {less than} Goto P Disp "3RD NUMBER" Input Z Int Z/->/Z {/->/ is the character produced by the STO> button} If Z>9 {greater than} Goto P If Z<1 {less than} Goto P ClrHome If X=A Goto 4 If Y=B Goto 5 If Z=C Goto 1 Goto 0 {zero} Lbl C ClrHome Disp A Disp B Disp C Pause Goto P Lbl 4 If Y=B Goto 7 Lbl 5 If Z=C Goto 2 Goto 1 Lbl 0 {zero} Disp "YOU DID NOT" Disp "GET ANY RIGHT" Goto E Lbl 1 Disp "YOU GOT 1 OUT" Disp "OF 3 RIGHT" Disp "10 POINTS!" [theta]+10/->/[theta] {/->/ is the character produced by the STO> button} {|} {press ALPHA - 3} Goto E Lbl 2 Disp "YOU GOT 2 OF" Disp "3 RIGHT!!" Disp "25 POINTS!" [theta]+25/->/[theta] {/->/ is the character produced by the STO> button} {|} {press ALPHA - 3} Goto E Lbl 3 Disp "THREES A MATCH!!" Disp "60 POINTS!!" [theta]+60/->/[theta] {/->/ is the character produced by the STO> button} {|} {press ALPHA - 3} Lbl E Disp "SCORE" Disp [theta] {press ALPHA - 3} Disp "NUMBER" Disp D Pause Goto R Lbl 7 If Z=C Goto 3 Goto 2 Lbl Q \STOP81\