UMBC CMSC 201 Spring '99 | CSEE | 201 | 201 S'99 | lectures | news | help |
CMSC 201 a-MAZE-ing Out: Monday 3/29/99 |
The objective of this assignment is to get you familiar with using
arrays, separate compilation, and just a touch of using pointers as
parameters.
This project also contains a bit more problem solving and software
design than other projects so far.
Not all programs are written as part of multi-million dollar projects, nor are they "killer apps". Sometimes we just write programs that are entertaining. This project is one of those programs -- just for fun.
You are to write a program that simulates a dynamic maze. The maze is conceptually a 21 - by - 21 checker board made up of 441 squares. A mouse starts in the middle square of the maze and attempts to escape the maze by moving off any edge. The rules of mouse movement are given below.
For example, if the mouse was at maze[6][5] and chose to move left from there to maze[6][4], then the display would show "<" at maze[6][5].
The mouse is trapped there with no un-visited squares to move to
The results of using other selected random number seeds and starting at maze[10][10]:
Seed | Result |
2 | Trapped at maze[16][7] |
3 | Out at maze[20][7] |
5 | Out at maze[14][0] |
1122 | Out at maze[0][4] |
8888 | Trapped at maze[14][10] |
12345 | Out at maze[0][6] |
13579 | Out at maze[20][3] |
24680 | Out at maze[0][10] |
To submit your project, type the following at the Unix prompt:
submit cs201 proj3 proj3.c maze.c maze.h
To verify that your project was submitted, you can execute the following command at the Unix prompt. It will show all files that you submitted in a format similar to the Unix 'ls' command.
submitls cs201 proj3
Tuesday, 30-Mar-1999 14:06:36 EST