Between getting shredded for my "Facebook" code, I made another rudimentary project. The Magic 8 Ball for the TI-84.

It's straightforward. I used the random integer command - randInt( - to generate an answer type: positive, uncertain, or negative. Then, another randInt( to choose the answer type from that category.

Source Code: https://github.com/EverydayCodeNet/MAGIC-84/releases

How I made it: https://youtu.be/-ZCks6Ozu8k

CHANGE LOG:
- Removed ending Goto command.

Besides seeds or those darn GOTO commands, what suggestions do you have?

This project is meant to stand alone, so not many updates will be made.
I really like the way you structure your videos - and programs such as these are perfect for that style of presentation as well. Nice work Smile.
I recommend that you use Ans:
Code:
int(19rand->A
If not(A
"IT IS CERTAIN
If A=1
"IT IS DECIDEDLY SO
If A=2
"WITHOUT A DOUBT
If A=3
"YES - DEFINITELY
If A=4
"YOU MAY RELY ON IT
If A=5
"AS I SEE IT, YES
If A=6
"MOST LIKELY
If A=7
"OUTLOOK GOOD
If A=8
"SIGNS POINT TO YES
If A=9
"REPLY HAZY, TRY AGAIN
If A=10
"ASK AGAIN LATER
If A=11
"BETTER NOT TELL YOU NOW
If A=12
"CANNOT PREDICT NOW
If A=13
"CONCENTRATE AND ASK AGAIN
If A=14
"DON'T COUNT ON IT
If A=15
"MY REPLY IS NO
If A=16
"MY SOURCES SAY NO
If A=17
"OUTLOOK NOT SO GOOD
If A=18
"VERY DOUBTFUL
Disp Ans+".


Or, even better, inString(:


Code:
"IT IS CERTAIN.IT IS DECIDEDLY SO.WITHOUT A DOUBT.YES - DEFINITELY.YOU MAY RELY ON IT.AS I SEE IT, YES.MOST LIKELY.OUTLOOK GOOD.SIGNS POINT TO YES.REPLY HAZY, TRY AGAIN.ASK AGAIN LATER.BETTER NOT TELL YOU NOW.CANNOT PREDICT NOW.CONCENTRATE AND ASK AGAIN.DON'T COUNT ON IT.MY REPLY IS NO.MY SOURCES SAY NO.OUTLOOK NOT SO GOOD.VERY DOUBTFUL.->Str1
1
For(A,1,19rand
1+inString(Str1,".",Ans
End
Disp sub(Str1,Ans,1+inString(Str1,".",Ans)-Ans


I highly recommend you get out of the habit of Label's and Goto's and start using Repeat and While.

Here's a full rewrite (with all your newline and ClrHome formatting) using inString(:

Code:
"IT IS CERTAIN.IT IS DECIDEDLY SO.WITHOUT A DOUBT.YES - DEFINITELY.YOU MAY RELY ON IT.AS I SEE IT, YES.MOST LIKELY.OUTLOOK GOOD.SIGNS POINT TO YES.REPLY HAZY, TRY AGAIN.ASK AGAIN LATER.BETTER NOT TELL YOU NOW.CANNOT PREDICT NOW.CONCENTRATE AND ASK AGAIN.DON'T COUNT ON IT.MY REPLY IS NO.MY SOURCES SAY NO.OUTLOOK NOT SO GOOD.VERY DOUBTFUL.->Str1
Repeat not(P
ClrHome
Disp "THINK OF A YES/NO","QUESTION...","
Pause "PRESS [ENTER] TO CONTINUE.
1
For(A,1,19rand
1+inString(Str1,".",Ans
End
Disp "",sub(Str1,Ans,1+inString(Str1,".",Ans)-Ans
Disp "","PLAY AGAIN? 1=YES, 0=NO
Input P
End
ClrHome
Disp "MAGIC 8 BALL
Disp "BY EVERYDAY CODE
Disp "EVERYDAYCODEBIZ@GMAIL.COM
  
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 UTC - 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