How can I implement this?


I am doing a project which consists of having 9 cubes that form a puzzle. When a cube is positioned correctly it emits a green light, otherwise a red light. How can it be possible for a specific cube to know whether or not is in the right position?
p.s I'm a beginner in Arduino.

Thank you in advance!

Can you add connectors to the cubes? And when you place a cube, you actually push it in a connector of the opposite gender.

No I shouldn't use a connector. Also it is important that each cube knows with which side of the other cube is connected. One thought solutions is RFID tags but it is costly

I'm a beginner in Arduino.

Yet you choose an almost impossible project.

Also posted here:

OP: if you're going to sprinkle the same question all over the Internet, please at least be considerate enough to provide links to the others so nobody has to waste their time giving you answers that you already have on some other site. A little bit of consideration can go a long way.