# Rubik's Cube Simulator

GitHub repository: https://github.com/robo-technical-group/rubiks-cube.git

I thought it might be fun to build a Rubik’s Cube simulator in MakeCode Arcade. The controls and interface are basic, but they get the job done.

Up and Down select a move. The current move is printed at the top of the screen. Right applies the move to the cube; Left applies the inverse move. Press A to see a list of your moves. Press B to shuffle or scramble the cube. If you make a mess of your cube, just reset the game.

The core functionality is in `cube.ts`. I’ve only built the standard 3x3x3 cube, although I’ve built-in the capability of handling Junior or Mini (2x2x2) and Rubik’s Revenge (4x4x4). For the standard cube, I’ve only built the simple moves. I’ll add the other moves a bit later. (These are now done as of version 0.2.0.) I also have added the capability for simple animations, but I have not drawn them yet. My drafting tools are in storage, and my isometric drawing skills are pretty rusty!

As a kid, I was terrible at the Rubik’s Cube. A couple of years ago, though, I thought I’d pick one up again and actually learn how to solve it. There are a ton of great resources, but an excellent starting point is the Rubik’s Cube official education site, You Can Do the Cube. I’ve been working with my nieces and nephews, all of whom are under the age of ten, with the Rubik’s Cube Mini. It took some practice, but they’re able to solve the junior cube. I’m super proud of them!

This one was a lot of fun. More soon!

TODO

(Roughly in order)

• [X] Add rotation moves (v. 0.2.0)
• [X] Add middle slice moves (v.0.2.0)
• [X] Add shuffle (v. 0.2.0)
• [ ] Add solver (simple solver from You Can Do the Cube)
• [ ] Add test animation
• [ ] Finish animations
• [ ] Add junior cube

See all of my MakeCode Arcade games and extensions here!

19 Likes

Wow. I love Rubik’s cubes literally!!

1 Like

I tried making a scrambler but it didn’t work. All I had was numbers instead of the notations

Went from here to here. I actually know how to solve a bunch of rubiks cubes

1 Like

WOW

1 Like

Omg

Oops wrong photo @AlexK. I gotta get the other one on my phone

All my rubiks cubes!!

2 Likes

Is that cross even a rubix cube?

Sure is! Great puzzle; you can morph it into a whole bunch of shapes. In the U.S., it’s known as the Rubik’s Twist. In other countries, it also was called the Rubik’s Snake.

they are all fun to play with!!
Does anyone play with these twisty puzzles?
I found one of my speedcubes somewhere and I have been trying to find it for about two years?!

1 Like

I have two of those!

2 Likes

Which ones?

The rubix twist/snake

1 Like

I can only solve the 3x3 (mirror, regular, and image) 2x2 (Regular and Mirror) 4x4 (regular) and I also have the snake.

1 Like

I can solve, square-1, 4x4, 5x5, 3x3 and all the mirrors and snake. Plus megaminx

you restarted the rubik’s ube bcz i can see the time 7:26-7:26

Oh wow, I didn’t even know this thread existed! I can solve 3x3 (I have a GAN) and 2x2.

PB for 3x3: 26.00 (I know I’m surprised it’s exact too)
PB for 2x2: In the Shadow Realm XD

Go here and import my username (exactly how it is) and then you’ll be able to see my times: https://ruwix.com/online-rubiks-stopwatch-timer/

1 Like

it is not possible bcz you need a lot of time to master btw my Pb (Personal Best) is14.90 for3x3 and my Pb
2x2 is 3.24
4x4 is1.27.59
Kilominx is 18.36(a kilominx is technicality a 2x2
Megaminx)
and these are my cubes