Thankyou. I will explain then.

I picked up a paper, drew and made everything look logic, and then tried to define the structure of what i made in the paper.

So, First I thought about it this way.

A cube has 27 cubes in it, that "would" have the same colors as the main cube if it was solved.
So I would make an array[3][3][3].

Therefor this structure:
Code:
// Rubik cube
typedef struct cubeR
{ square q[3][3][3];
}cube;


Then I thought that if you are viewing the cube from a 3d perspective. You can imagine that it has two sides facing the X axis, two facing the Y axis, and two facing the Z axis. Therefor making the 6 sides of the cube.

And why did I use that variable. Because, when filling the smaller cubes with colors, there are squares that dont face the outside of the cube. So at this point, I would pick up your sugestion and use the enum you sugested me.
Instead of having little cubes with 6 squares with collors that dont even face the outside of the cube, I would probably use your sugestion. That is why I used the structure bellow. With the quad vector[6] (six sides of each little square).

Code:
// Cubes in the rubik cube
typedef struct squareR
{ quad q[6];
char axys;
// Check if its side is valid, eg. If it shows on the rubik cube
int valid;
}square;


I'm hopping you're understanding what I'm writting here.

Then, For each of those little squares, on each of the 27 cubes, of the rubik cube, I had this:

Code:
// each square of the little cubes in the rubik cube
typedef struct quadr
{
        char collor;
char axys;
} quad;


So once again, we have the axys variable. And why do I have an axys before and after. So that I can compare this axys variable to the main cube axys variable and see of they are the same, if they were the same, it would mean that they would be showing, and that way, they would be "valid".


This is like the first part. My second part has another couple of structures defining the way you visually see it.

Thankyou once again.