The module starts the game by displaying the board with all the holes are filled with pegs.
The board class contains 15 hole objects. Each hole object knows its status of whether there is a peg in it. When the user clicks the first peg, the peg's location will be passed as a string contain two numbers (for example: 21). The module passes the location of the taken piece to a solver, written by Jonathan Bach, After passing the first location, the module will continuously receive moves from the solver. The move will consist of two locations. First location indicates the moving peg and the second location indicates the destination hole. The middle peg will be removed from the board. The module assumes the solver follow the rule so the validity of the move is not checked by the module. After each move, the module checks the number of remaining pegs. The puzzle will stop when the number of pegs reach 1.
There will be a mouse handler and a keyboard handler. These handlers will capture mouse and keyboard action. The solving process will start when the user click on a peg.
During the play back, the user can change the view by pressing keys "1" "2" "3" and "4". By pressing these key, the user can move to the predesignated spots to look at the board. The user can also change the view manually by press the key "p" to pause the solving process, and then use the arrow to look up, down, left, right, press "f" to move forward and "b" to move backward. Pressing the key "q" will quit the puzzle
When the puzzle is solved, the program will stop executing any move. At this point, the user can press "r" to generate a new board and repeate the process.