Desperately seeking help coding a Rubik's Cube

I’m creating a game that is similar to a Rubik’s Cube in the fact that you have a 3 x 3 x 3 that you can turn the sides to create new cube arrangements.

However, coding this in proving to be extremely difficult. I tried creating lists for cubes that move when you twist in one direction or the other, but that would mean updating the cubes for each list whenever it’s rotated.

My brain is starting to go numb. Maybe I deserve this.
But if anyone thinks this is easy and can give me a C# explanation, I would be really happy. Thanks.

“but that would mean updating the cubes for each list whenever it’s rotated”

That is utterly correct, and, completely ordinary.

It is very, very, VERY – notoriously - difficult to program something like Rubik’s Cube.

But yes, you simply have a 3x3 array (say) for each of the six sides.

Certainly, as a matter of course, each time the user moves some pieces … you actually change those arrays.

(That’s the least of your problems!) Good luck!