Prog 6: Undo

Using either your solution or my solution to program 5 (available on Piazza), now store all game information after each move, allowing undoing moves back to the beginning of the game, as long as the player is still alive.  Once the player in the game dies, the program exits and moves cannot be undone.  This must be implemented using a linked list. 

Suggestions

Note that for this program we will not be grading on programming style, and will only be grading on correct program execution. No late submissions will be accepted.

Running the program should like like the following:

       You are in room 13. You smell a stench.          1. Enter your move (or 'D' for directions): p                ______18______               /      |       \              /      _9__      \             /      /    \      \            /      /      \      \           17     8        10     19           | \   / \      /  \   / |           |  \ /   \    /    \ /  |           |   7     1---2     11  |           |   |    /     \    |   |           |   6----5     3---12   |           |   |     \   /     |   |           |   \       4      /    |           |    \      |     /     |           \     15---14---13     /            \   /            \   /             \ /              \ /             16---------------20          You are in room 13. You smell a stench.          1. Enter your move (or 'D' for directions): R         (Remember arrow value of -1 means it is with the person.)         Enter the 7 room locations (1..20) for player, wumpus, bats1, bats2, pit1, pit2, and arrow:         1 2 4 12 6 10 -1          You are in room 1. You smell a stench.          1. Enter your move (or 'D' for directions): u         Sorry, you can't undo past the beginning of the game.  Please retry.         You are in room 1. You smell a stench.          1. Enter your move (or 'D' for directions): m 5         You are in room 5. You feel a draft. You hear rustling of bat wings.          2. Enter your move (or 'D' for directions): u         You are in room 1. You smell a stench.          1. Enter your move (or 'D' for directions): m 8         You are in room 8.          2. Enter your move (or 'D' for directions): m 9         You are in room 9. You feel a draft.          3. Enter your move (or 'D' for directions): u         You are in room 8.          2. Enter your move (or 'D' for directions): u         You are in room 1. You smell a stench.          1. Enter your move (or 'D' for directions): u         Sorry, you can't undo past the beginning of the game.  Please retry.         You are in room 1. You smell a stench.          1. Enter your move (or 'D' for directions): m 5         You are in room 5. You feel a draft. You hear rustling of bat wings.          2. Enter your move (or 'D' for directions): m 6         Aaaaaaaaahhhhhh....             You fall into a pit and die.          Exiting Program ...