This is the classic 'Tiles Puzzle' where the player has to move the shuffled tiles to form an image. The player clicks on any tile adjacent to the 'empty' (black) tile to move the corressponding tile into the empty spot.
It's a simple Java Swing JFrame application.
-
Clone / Copy the repostitory.
-
Open Terminal / Command Prompt, move to the file location.
-
Enter
javac TileGame.java MyConstants.java PaintPanel.java java TileGame
- You can Copy / Paste any number of images into the
img
directory without making any modifications to the code. - The filename of the images can be any random string.
- The number of tiles in a row or column can be changed.
- The tiled image can be changed without changing the relative configuration of the tiles.
- The tiles can be shuffled with the image remaining same.
- Both the sequence of tiles and the image can be changed through
New Game
- Create save game files by writing the ord[] after each move to a file.
- User can create multiple save games or overwrite existing ones at any point of the game.
- Create a
Save Game
/Load Game
option. - Create an
Undo
/Redo
button which uses the save game file discussed in (1).