Prog 6: GridMatch LinkedList

(You may NOT work with a partner on this program.  It must be done individually.)

Using your solution (or the instructor's solution) to Program 5 GridMatch, add the ability to undo moves.  Each move (board and move number) must be stored on a linked list.  Selecting 'u' to undo will revert back to the previous board configuration and the previous move number.  Attempting to undo past the beginning of the game results in an error message.  The interface will be the same except you will also offer 'u' as a user input option.

In addition once all possible moves have been made for a board the program should display a message "Game is finished" and automatically start over, with a new linked list.  You should not be able to "undo" past the beginning of a new board back into the previous board configuration.

Author: Dale Reed Date: 4/5/12, CS 102 Spring '12 System: C++  Play the game of Grid Match.  The object is to make as many squares as possible disappear from the board. On each move choose a particular square using the row,column coordinates.  That square and any adjacent similar squares will all be blanked out if there are 3 or more of them. Squares above the empty squares then slide down.  Empty columns slide to the left. Input of 'r' will restart the game and re-randomize the board, and input of 'x' will exit the game.       0 1 2 3 4 5 6 7 8 9     ---------------------  A | # + - @ # @ - - - @ | A  B | # # # + # + + - + @ | B  C | + @ - # @ - # @ - + | C  D | + - + - # @ + + + - | D  E | + + - # # @ # + # @ | E  F | + @ - # # + + # # - | F  G | @ + - - @ - @ - @ @ | G  H | - # - # - - - # # @ | H     ---------------------      0 1 2 3 4 5 6 7 8 9  1. Enter the row and column (e.g. c5)    or r(reset) x(exit) u(undo) -->

Notes & Grading:

See the linked list code discussed in class and solutions from previous semester to linked-list problems to help you in this program.

The 55 points for execution will be distributed as follows:

Extra Credit: (up to 5 more points)

Board size starts at 6 rows x 8 columns and grows by 2 in each dimension after each board configuration is finished, to a maximum of 14 x 16.  You will need to use letters for both row and column selection.