Objective: Build an interesting game using much of what you have learned so far.
Sokoban is a computer maze game. Its rules are quite simple. There are several marbles placed in a maze. One marble is blue and represents the player. The user uses the arrow keys to move the player marble around. The other marbles must be pushed into a goal area. The goal area is simply part of the maze drawn in yellow. The player marble moves the other marbles into the goal by getting behind a marble and pushing it into the goal. There is one catch. The player marble can only push one marble at a time and can only push it one square at a time. A level is complete when all the target marbles are in the goal area. There are many levels with different shaped mazes and different numbers of target marbles to move.
A picture of the game in progress is shown below. At this point one of the marbles has been pushed into the goal area.
If the user completes a level, the label on the button changes to ``Next level''. Clicking on the button then removes the current level and draws the maze for the next level of the game by reading in the file containing the next level.