The Classic 8 Puzzle board contains 8 photo tiles and 1 free space (the Star). A "move" is made by clicking a tile adjacent to the Star, which causes it to then move into the Star space. Moving all tiles all tiles to their correct positions, with the free space at the top right, reveals a picture of my daughter Ichino.
The tile positions are shuffled each time the game is loaded. When taking this naive approach, about 50% of configurations will be unsolvable. This can be overcome using an algorithm to determine if the number of inversions in the initial state is odd or even. An inversion is defined as any pair of tiles i and j where i < j but i appears after j. Internally the tiles are stored as a 1 dimensional list (an indexed Array). Iterating over its elements two at a time, the inversion count can be calculated and solvability determined.