This recipe you shows how to implement the game logic for a picture puzzle game. The game consists of a set of rectangular tiles shuffled and rendered on the screen. Users can tap on individual tiles, and move them around, swapping them with the other tiles. Let us draft the backbone data structures to implement this logic.
To feel the game logic better, you can build and run the
2_PuzzleProto project, which can be downloaded from www.packtpub.com/support. If you want to enjoy the full-featured game, just go ahead and download our Linderdaum Puzzle HD from Google Play. You can do it at http://play.google.com/store/apps/details?id=com.linderdaum.engine.puzzLHD.