The popular N Puzzle game
Goal: To put numbers in sorted order from left to right and then top to bottom. e.g. for 4 X 4 grid the desired state would be
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 _
** You can change grid size by changing variable n in NPuzzle.java
Operations possible: only 1.)Swap the empty cell with adjacent cell(right, left, top, bottom) by clicking on the adjacent cell.
Color coding: Green indicates the number is in its correct position. Yellow indicates the number is the smallest misplaced number in the desired goal state. Red indicates the number is in wrong position.
When all numbers go green you have won the game!
Have fun!