#ifndef MAZEQUEUE_H #define MAZEQUEUE_H /*** * The Mazequeue interface is defined in this file. Mazequeue is a simple * wrapper for a Standard Template Library list of MazeElements. * MazeElements are just a group of simple variables that need to be tracked * together as a unit. All in all, this is pretty simple. For * more information on the STL, check http://www.sgi.com/tech/stl/ */ #include #include "point.h" // A very simple class. Each element remembers its position, who // visited it (if anyone), and the character representation of // its contents. class MazeElement { public: Point visitedBy; Point location; char contents; bool visited; }; // A simple wrapper on an STL list of MazeElements. class MazeQueue { public: // The enqueue operation (get in line) void remember(MazeElement* e); // The dequeue operation (return the front of the line) MazeElement* getNext(); // Get the number of elements waiting in the queue int getLen(); private: // The list we will use as the basis for our queue. list q; }; #endif // MAZEQUEUE_H