Prog 6: Undo Scramble
Add the ability to "undo" a move to your solution to program #5, Scramble. Moves should be numbered, with the human always going first. Entering 'u' to undo moves should allow the human player to redo their previous move. Entering 'u' to undo should give an error message if it is the first move.
To implement the undo feature you should store a "snapshot" of the game just before each human's move. This "snapshot" should include the board, score, move number, current tiles for human player, current tiles for computer, and tiles remaining. You should create a struct with all these elements and store them all on a linked list (a LIFO stack).
The 55 points for execution will be awarded for the following:
( 35 points) Allows undoing moves one move at a time, back to the beginning of the game. Attempt to undo at beginning of game gives warning and allows retrying input. This must be implemented. No points will be given for either execution or style if this is not done.
( 5 points) Moves should be numbered, with the first move numbered as move #1 (not 0).
( 5 points) Score using values for each letter, rather than simply 1 point per letter. The ongoing score should be displayed on each move.
(10 points) Dictionary words will not be read into a two-dimensional array, but rather will have space dynamically allocated for each word as they are read in. This way there will be no wasted space for large array elements with small words in them.
(10 points extra credit) The board is implemented using a linked structure that wraps around at the sides and top.
As usual, turn this in using Blackboard.