Fall 1997 Semester
CS78 Section A
Lab 09 Assignment
Assigned 97/11/04
Due      97/11/10


Jacqueline came back yesterday.  She's fiddling with that game
again and wants your help.  She's created some mazes in files
and wants to make the user wander through them till they find
the exit.  They'll use the same movement keys as before to
move, but now they have someplace to go.

The maze files have the following format:

------------------------------------------------------
rows columns
character description of the maze
------------------------------------------------------

The first line contains the number of rows and columns in the
maze.  Jacqueline has told you the largest one is 20x20.  The
following rows lines describe the maze.  If there is a space
in a position, the user can walk there.  If there is an X in
a position, it represents a wall.  The space marked S is the
start position.  The space marked E is the exit position.
All mazes are assumed to be solvable (she checked them really
thoroughly).

You'll have to read in the name of the file to open, looping
until a valid file name is entered.  Then open the file and
read in the maze.  Place the user at the start position (the
user is to be represented by a P (for player).  As they move
through the maze, change the spaces they were in to dots (or
periods -- '.').  That way they can follow their progress
through the maze.  Don't let them walk through walls, of
course.  And if they walk back through their own trail, give
them a little message pointing out that they seem lost or
something.  *smile*  When they reach the exit, the program
should congratulate them and ask if they want to play again.
If so, get the name of another maze file and start again.
If not, leave the game gracefully.



Make sure you get inputs in the right order and check for the appropriate error conditions. Remember, part of your grade comes from using what was taught this week! Use the stuff I taught this week! Feel free to use previous weeks' material as well, of course. But don't work ahead. What: are you TRYING to drive me nuts? *phbbt* *grin*
You are to still perform the first four steps of the SDP. However, you won't be required to turn them in this time. If you come to me for help, I may ask you to see your SDP. And if people don't do well, I'll have you start turning it in again. But for now, you can just submit the C++ lab portion. This should be turned in as lab 9, C++ lab -- one file.
I believe that about covers it. See you in class! Remember, if you have ANY questions, please email me or come see me in my office hours. Thank you...