I am planning on making a Rubik's cube emulator on the ti84pcse. Some problems I have are:
I need 50+ variables I can change, as far as I know there are only 26
I need color text in TI basic
It is TI basic text, I might not be able to fit it on screen
I know how to make this if I can solve these problems. If you know, it would be great if you could post your answers.
For 50 vars i would use a list or matrices (go with a list). Yes more data... BUT you may find you have more functionality with it as a list.
Yup, a list would be good.

For the other problem: I think DoorsCSE 8 does something about that, though I've never used it.
I've not used any ti-basic CE commands, I think you just have to use textcolor(RBG value) but use catalog to see if I'm right.
And there are more than 26 variables. Some can be found in the Finance app, unless I'm mistaken.
How would I use a list, I have not used lists before.
This, Asian, is what you want:
http://tibasicdev.wikidot.com/sk:lists
Depending on the size of the Rubik's cube, you could use a single matrix to encompass all the squares. Manipulating proper cells in the matrix would be a bit tricky, but it would eliminate the need for tons of variables.
It might take a little more memory, but you could also do it in separate matrices. It might be a little easier to manipulate that way.
It's a 2x2x2, a 3x3x3 would be too hard to make for me and I have a 3x3x3 already. I also wanted to do a cooler project than my last one(text pokeMAN). Also, what are matrices? They are related to math, but how do I use them? Also, I need something where the calc can read a specific # in the list, etc, if there are 500 values in a list, I need it to be able to set, for example, the 56th value to the variable X and output the letter X in a specific location. That is my plan, store all the colors, and use buttons to change the direction of the cube, or turn the cube. With 2x2x2 it should be kind of easy.
The reading list elements Is the easy part.

Code:
ʟ1(34)→x

That would store the 34th element in list 1 to X.

I'm not sure what you mean by outputting the value of X somewhere.

Matrices are like a 2D list.
So for a list, how would I store X to the 34th element of a list?

Code:
X→ʟ1
Asian wrote:
So for a list, how would I store X to the 34th element of a list?


Make sure your list has a dimension of 34 first:


Code:
:If dim(ʟ1) <34
:Then
:34→dim(ʟ1


Then:


Code:
X→ʟ1(34


This code won't work:

Code:
X→ʟ1


It will give you an error: datatype.
This is because you tried to store a var in a list.

vars are singular, Lists are sourounded by {}.
Take a look at metroCity I use a list in version two to store city values, Monet etc.
Just remember you need to make the list name descriptive in order for your not technically advanced users to delete them,


Code:

#→dim( ʟname :to create a list with # of spaces
VAR→ʟname    :to set the spaces with a value, if in color maybe a RBG value
if
ʟname(<,>,▫,≠,≤,≥)VAR
Then [i]DO THIS[/i] :an if statement with lists, so you can if  RBG value then set this
Oh, yeah, sorry. I thought that that was what I put.
Hows it coming along Asian?
I have started making the model of the cube, the turning mechanism, the quitting mechanism, and I still need to figure out how to make colored text.
Quote:
- The homescreen is 10 rows talls (instead of 8) and 26 columns wide (instead of 16)
- The graphscreen is 265 pixels wide (instead of 95) and 165 pixels tall (instead of 63).
- You can use the TextColor( command to set a color before you use the Text( command on the graphscreen.
- You cannot use colors on the homescreen.
- You can draw lines, points, circles, and so on in colors, and there are two new styles for points. You can also draw lines as 1 or 2 pixels thick.
quote from KermM
Hopefully this helps it seems that you use the color name.
Woohoo! Starting over after half a year of procatination!
Using Celtic libs for the buttons
Displays 1 face of the cube at a time
Keeps track of location of colors in a list:
1-red
2-orange
3-yellow
4-green
5-blue
6-white
No borders of the colors.
Hopefully I can actually not quit on this one!
  
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 2
» 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