Project 1: Maze escape
- Due Oct 30, 2019 by 10pm
- Points 100
- Submitting a file upload
- File Types cpp
Project Description
Your task is to try to figure out how to exit a maze that you read in from a text file. The file will contain characters that represent walls (#), open spaces (.), and the exit (E). You should read the file and store it in a vector of vector of characters. Your solution must be done via recursion.
Requirements
Your program should operate in the following manner. Grade percentages for each item are listed in parentheses.
- Ask the user for the name of a file that contains the description of the maze. For simplicity, you may assume that all mazes are 10x10. (5%)
- Load the contents of the file and display it in a human readable manner. For this part of the project, you may just display the same characters as you read in from the maze file. (10%)
- Display row and column identifiers so that the person using the program can figure out where to put the "person" in the maze. To help your program, your rows and columns should start numbering at 0. (10%)
- Ask the user where to place the person, do some work, and repeated ask the user where to place the person for the next solution. (5%)
- Indicate whether the person can escape from the maze when starting at the location specified by the user. (50%)
- Show the person moving around in the maze (0.5 - 1 second delay so that a human watching can follow the path). (10%)
- Show a green path from the starting point to the exit (if the maze can be escaped), a red path where the person hit a dead end and had to backtrack, and a yellow path for the part of the maze that is being explored. (10%)
Extra Credit
After completing the above tasks, you can get extra credit for the following extensions to your project:
- Handling a larger maze
- Finding the shortest path between the starting point and the exit
- Modifying your display to indicate locations that are dead-ends before asking the user for a starting location
- Allowing for movable objects that can be pushed, but can block your path if pushed in the wrong spots
- Allowing for locations that only allow for movement in one direction.
- Providing locations that teleport you from another specified location.
- Having doors than can only be opened by specific keys.
- etc.
Rubric
Keep in mind that 18 students have already been assessed using this rubric. Changing it will affect their evaluations.
Criteria | Ratings | Pts | |
---|---|---|---|
Get file name
threshold:
pts
|
pts
--
|
||
Load an display file
threshold:
pts
|
pts
--
|
||
Display row & column ids
threshold:
pts
|
pts
--
|
||
Get starting location
threshold:
pts
|
pts
--
|
||
Compute escape path
threshold:
pts
|
pts
--
|
||
Delayed updates
threshold:
pts
|
pts
--
|
||
Color-coded paths
threshold:
pts
|
pts
--
|
||
Total Points:
100.0
out of 100.0
|