Pick A Number - "pickanum" for short, is a game coded in TI Basic.

The goal is to guess the randomly generated number in the least amount of tries possible.

The game modes are: 1-10, 1-100, 1-100,000.

Rated #1 best time wasting game. - Feb 2020

How I Made It: https://youtu.be/85_ksSZzb7w

DOWNLOAD: https://github.com/EverydayCodeNet/PICK-A-NUM/releases/tag/v1.1

OTHER IDEAS:
- Single calculator multiplayer (one person picks the numbers)
- Custom range

ACKNOWLEDGEMENTS:
- LogicalJoe: Condensed game function.
I want to make it clear that I did not actually write any of the code, I only pointed Everyday in the right direction, the following is closer to what I originally had in mind [Untested, but should work]...

Code:
"PICK A NUMBER->Str1
While 1
DelVar S10
ClrHome
Menu(Str1,"EASY",E,"MEDIUM",M,"HARD",H,"QUIT",Q
Lbl Q
Disp Str1,"BY EVERYDAY CODE","EVERYDAYCODEBIZ@GMAIL.COM
Return
Lbl H
Ans+99900
Lbl M
Ans+90
Lbl E
Ans->M
randInt(1,M->N
Repeat B=N
"LOW!
If B>N
"HIGH!
If S
Pause "TOO "+Ans,.7
ClrHome
Disp "SCORE: "+toString(S),"",Str1+" 1-"+toString(M)+"...
Input "GUESS:",B
1+S->S
Disp "
End
Disp "CORRECT!","
Pause "PRESS ENTER TO CONTINUE!
ClrHome
Disp "YOU WIN!!!","","SCORE: "+toString(S),"
Pause Ans
End
He changed the synthetics on me…

There is no reason to worry about "Cleaning up" afterward, each program should set everything up itself.

Game code with closing quotes and comments…

Code:
Repeat B=N // https://tibasicdev.wikidot.com/repeat
"LOW!" // Ans is "LOW"
If B>N
"HIGH!" // If B>N it changes Ans to "HIGH"
If S
Pause "TOO "+Ans,.7 // If your score is not zero (equivalent to not your first time through the loop) it displays your "TOO xxxx!".
ClrHome
Disp "SCORE: "+toString(S),"",Str1+" 1-"+toString(M)+"..."
Input "GUESS:",B
1+S->S
Disp ""
End
Disp "CORRECT!","" // Since this happens no matter what when the loop ends, we can pull it out and put it after the loop.
Pause "PRESS ENTER TO CONTINUE!"
I hope this helps.

May add more when I think of it.

Edit 1: Removed the use of Str2.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement