#ifndef MAZE001_H
#define MAZE001_H

#include <cellD2.h>
#include <gobj.h>
#include <mazematrixD2.h>
#include <mazematrixmapD2.h>
#include <point.h>


/*!
\brief Simple one path maze. 
*/
class maze001
{
public:

  /** Maze. */
  mazematrixD2<uint> mz;
  /** Relative from top left. */
  mazematrixmapD2<uint,int> mmap;
  /** Length of square. */
  double dx;
  /** Move maze. */
  point2<double> origin;

  /** Brief description of each test. */
  static string doc[];

  /** Global graphics stream. */
  gobjContainer xGraphics;

  /** Default keyboard handler - ESC to quit. */
  static void keyboard01(unsigned char key, int x, int y);
  /** Displays the gobj::global with double buffering. */
  static void display01();

  /** Display a grid. */
  maze001(int argc, char** argv);

  /** Enter infinite graphics display. */
  void eval();

  /** Iterates over each cell, drawing to global graphics stream. */
  void constructgraphics();

  /** Draw cell to graphics stream. */
  void celldraw
  ( 
    cellD2<uint> const & x,
    point2<double> const & p
  );

};


#endif


