Site hosted by Angelfire.com: Build your free website today!

In the maze the "pi" characters are the walls and the "M" is the mouse. My algorithm is fairly simple, but when its translated to code it gets pretty complicated. My algorithm is that if the mouse can't go foward(up or [row-1][column]) it checks the right then left then if those spaces are walls then he goes back. I think turning the maze made the code more complicated, but at least the code works. One flaw is that the mouse has to go past the exit twice before he can exit. I made my code as simple to understand as I could. Most of the actions are broken up in seperate functions(turning the maze, checking right,left,foward and back for spaces, moving the mouse, displaying the maze and finding the new coordinates of the mouse when the maze is turned) which are brought togther by another function. The program cycles through the action function which makes the mouse go one space until he reaches the end, but because the nature of my algorithm, I have to add an extra if statement to check for the exit when it gets to the 11th row.
Maze

Maze.cpp

 

Maze.exe

winkawaks

Marvel Vs Capcom

csfiles

zsnes

zsnes1

Yoshi's Island

ch19proj.cpp

a practice examination