What is the game all about?
It's a puzzle game. I am using AndEngine to build it on Android platform (currently). I have divided the game into various World, with each World containing various Levels.
What is the Issue?
See the Game design below. The purpose of the game is to drag-and-drop the broken pieces into the "drop" area (a.k.a. holder) and form the circle. I've developed the basic 2 levels of the game. This is the third level. Where there are 3 pieces as different objects named 1,2,3. I've to drop all 3 pieces into the drop. The issue is how do I know that all the broken pieces have filled the holder? I'm using AndEngine for the first time and have very little idea how this can be done. Tapping on any broken object would rotate it by 90 degrees. So there can be 4 possible solutions for each of them).
Also, the logic should hold true for any shape, any number of broken pieces, any number of holders.
Ideas that I've thought about
We've thought to solve this using:
- Area of the holder is filled -> But how do we programmatically do that?
- Take center coordinates of each broken piece and find the distance from the center of the circle. Verify this in all the 4 conditions (all 4 rotations by 90 degree each). -> We're trying to figure this out.
- See if all the broken pieces are used in the holder area -> What if there are more than one holder?
Any technical help or any references would be really great.