Program 6: Crossword with Undo

Prof. Reed, CS 102, Fall 2011

Due at 11:59pm on the date indicated in the Course Schedule

No partners on this project.  You must complete it on your own. 

Additional explanation added 11/21

Move number location and prompt for undo examples updated 11/28

Extend the previous crossword puzzle program so that each move is stored in a linked list.  Each node on the linked list must contain the move number and the entire board.  Entering 'u' to undo a move results in the most recently made move being undone, going back to a prompt at the previous move number.  Attempting to undo at the beginning of the game results in an error message, allowing the user to retry.  All features of the previous version of the program are still required, except in this version the program does not tell you whether the word you have chosen at each position is correct.  

The program should not allow placing a word if overlapping letters do not match.  The program should give a message once the crossword puzzle is complete, and should then exit the program.

Running this version of your program (for the sample input file) should look like the following:

  0 1 2 3 4 5 6 7 8 91011 a  *   b  * * * *   * * * * * * * c  * * * *   * *   * * * * d  *         *       * * * e  *   * *   * *   * * * * f  *   * *   * *   *   * * g  * * * *   h  * * * *   * * * *   * * i  * * * *   * * * *   * * j  * * * * * * * * * * * * k  * * * * * * * * * * * * l  * * * * * * * * * * * *

ACROSS:                                 Row Col Clue                        0. a   1  base 16                     1. g   4  catch with an _             4. d   1  does your cyber-dog _?      5. d   6  office in 917 _             DOWN:      Row Col Clue 2. a   4  pass with an _  3. d   1  8 _s make a byte  6. c   7  common _  7. f   9  K, as in _bytes

1. Please choose the number of a word to guess or x to exit -> 1 Please enter your guess: asterisk

  0 1 2 3 4 5 6 7 8 91011 a  *   b  * * * *   * * * * * * * c  * * * *   * *   * * * * d  *         *       * * * e  *   * *   * *   * * * * f  *   * *   * *   *   * * g  * * * * a s t e r i s k h  * * * *   * * * *   * * i  * * * *   * * * *   * * j  * * * * * * * * * * * * k  * * * * * * * * * * * * l  * * * * * * * * * * * *

ACROSS:                                 Row Col Clue                        0. a   1  base 16                     1. g   4  catch with an _             4. d   1  does your cyber-dog _?      5. d   6  office in 917 _             DOWN:      Row Col Clue 2. a   4  pass with an _  3. d   1  8 _s make a byte  6. c   7  common _  7. f   9  K, as in _bytes

2. Please choose the number of a word to guess or x to exit -> 7 Please enter your guess: silo

  0 1 2 3 4 5 6 7 8 91011 a  *   b  * * * *   * * * * * * * c  * * * *   * *   * * * * d  *         *       * * * e  *   * *   * *   * * * * f  *   * *   * *   * s * * g  * * * * a s t e r i s k h  * * * *   * * * * l * * i  * * * *   * * * * o * * j  * * * * * * * * * * * * k  * * * * * * * * * * * * l  * * * * * * * * * * * *

ACROSS:                                 Row Col Clue                        0. a   1  base 16                     1. g   4  catch with an _             4. d   1  does your cyber-dog _?      5. d   6  office in 917 _             DOWN:      Row Col Clue 2. a   4  pass with an _  3. d   1  8 _s make a byte  6. c   7  common _  7. f   9  K, as in _bytes

3. Please choose the number of a word to guess or x to exit -> uUndoing the last move

  0 1 2 3 4 5 6 7 8 91011 a  *   b  * * * *   * * * * * * * c  * * * *   * *   * * * * d  *         *       * * * e  *   * *   * *   * * * * f  *   * *   * *   *   * * g  * * * * a s t e r i s k h  * * * *   * * * *   * * i  * * * *   * * * *   * * j  * * * * * * * * * * * * k  * * * * * * * * * * * * l  * * * * * * * * * * * *

ACROSS:                                 Row Col Clue                        0. a   1  base 16                     1. g   4  catch with an _             4. d   1  does your cyber-dog _?      5. d   6  office in 917 _             DOWN:      Row Col Clue 2. a   4  pass with an _  3. d   1  8 _s make a byte  6. c   7  common _  7. f   9  K, as in _bytes

2. Please choose the number of a word to guess or x to exit -> 7 Please enter your guess:

You need to know the following concepts in order to write this program:

Notes: