- Programming help (TI-83 Plus BASIC)
- 07 Mar 2016 09:04:32 pm
- Last edited by StrawberryFrostedPopTart on 15 Mar 2016 04:15:50 pm; edited 4 times in total
So, I want to make a program that teaches mathematical pi up to 255 digits.
A few features I came up with for it are:
I already have a title screen and opening menu, which I like to put in all my programs. Here's the programming for that:
Code:
(Halfway through writing this my laptop lost charge and I lost half of my work, so here's an abridged version of the boatload of stuff I typed earlier)
Here's a list of things I need help with on my program.
If possible, please give me snippets of code I can use in my program. I'll be sure to credit anyone who helps!
EDIT:
Here's the current code in my test program:
Code:
Thank you to PT_ for that. So how I have it now, every time you hit a correct key, it will display "Test".
I need it to do three things:
So if anybody can help me with these things, please do.
A few features I came up with for it are:
- A training mode where it shows the digits up to 255, five digits at a time
A challenge mode where you type in as many digits as possible, and if you type in a wrong digit, it records your score and
if it's high enough, gets posted on the leader boards where it shows the top five scores. For a name you can type in eight characters.
I already have a title screen and opening menu, which I like to put in all my programs. Here's the programming for that:
Code:
:0->Xmin
:94->Xmax
:~62->Ymin
:0->Ymax
:AxesOff
:FnOff
:ClrDraw
:RecallPic 0 //The title screen image
:For(X,0,1000
:Ans->A
:End
:ClrDraw
:Menu("","Trainer mode",A,"Challenge mode",B,"Leaderboards",C,"Quit",Z
(Halfway through writing this my laptop lost charge and I lost half of my work, so here's an abridged version of the boatload of stuff I typed earlier)
Here's a list of things I need help with on my program.
- Graphics and pages. So what I imagine for the trainer mode is that it would show you five digits of pi at a time up to 255. Pressing the right arrow key would show you the next five digits, and pressing the left shows the previous five. I already know how to use getKey. What I want are nice-looking numbers. The Text( command wouldn't work because it outputs rather small characters. I want these characters to be large and nice looking. The only thing I have thought of so far would be using StorePic and RecallPic, but there's only room for ten of those, and five are already occupied on my calculator.
Leader boards. I need a way to display the top five scores alongside the person's name. I think that a custom list, list LDB might work, but I need ways to display the contents of the list (which I believe I may be able to figure out on my own, but it would be helpful if it were posted here anyways) and a way to input the name of the user. I believe that SortD( can put the scores in descending order, so that isn't a problem.
Challenge mode. So what challenge mode is, again, is that you would enter in as many digits as possible. When you type in an incorrect digit, it tells you how many you have gotten correct and determines whether or not it should be n the leader boards. Now, what I thought I would do is use a list to store all of the digits of pi, and if the digit entered isn't equal to the digit on the list, then it would give you a fail message and put your score on the leader board if it's high enough. But if I did it like that, then I would have to type in a line of code for every digit of pi up to 255. Is there a better way to do this?
If possible, please give me snippets of code I can use in my program. I'll be sure to credit anyone who helps!
EDIT:
Here's the current code in my test program:
Code:
:ClrHome
:"3.14159..."->Str1
:0->A
:Repeat Str2!=sub(Str1,A,1
:Repeat Ans
:getKey
:End
:Disp "Test
:sub("7894561230.",Ans-22-7int(.1Ans),1->Str2
:A+1->A
:If A>=length(Str1
:Then
:Disp "You win!
:Pause
:ClrHome
:End
:End
Thank you to PT_ for that. So how I have it now, every time you hit a correct key, it will display "Test".
I need it to do three things:
- Work on the graph screen, not the home screen
Instead of displaying a single thing every time you hit a correct key, I instead need it to display text. So when you hit the 3 key, it will execute a text command pasting a 3 at 1,1. Then when you hit the . key, I need it to paste a . after that. Then a 1, then a 4, and so on.
And finally, when you lose, I need it to store your score into a list, use SortD( to make the highest score the first on the list, and then send you to the leader boards.
So if anybody can help me with these things, please do.