# 480 solutions of the Magic magnetic cube puzzle

## The magic magnetic cube is a colored variant of the Soma cube puzzle. Let’s solve the puzzle in a browser using JavaScript.

I recently came across an addictive puzzle for kids — Magic magnetic cube. It is a set of 7 blocks with different shapes and colours that have to be assembled into a cube.

Depending on the vendor the same shapes can be colored differently.

After trying a bit, I eventually manage to assemble the blocks into a cube. But every assembled cube seems different because I assembled them accidentally, rather than consciously. So I wondered how many distinct cubes can be assembled from those 7 blocks.

Furthermore, it seemed to me that the assembled cube had the orange block at a corner. So I additionally wondered if the orange block can be placed in a cube not at a corner.

To answer those two questions that somewhat bothered me, I decided to calculate the possible solutions.

It turns out that 480 unique cubes can be assembled from the building blocks. None of the calculated 480…