libcoyotl - A Library of C++ Tools

Created by Scott Robert Ladd at Coyote Gulch Productions.


Public Member Functions | Static Protected Member Functions | List of all members
libcoyotl::maze::architect Class Reference

Pluggable object to randomize a maze. More...

#include <maze.h>

Inheritance diagram for libcoyotl::maze::architect:
libcoyotl::recursive_maze_architect

Public Member Functions

virtual void create_floor_plan (maze &a_target)=0
 Creates a floor plan for a maze.

Static Protected Member Functions

static cell ** get_cells (maze &a_target)
 Get cell map for a maze.

Detailed Description

Since several different algorithms can carve mazes with different characteristics, architect implements a polymorphic class, thus divorcing the carving algorithm from the data it generates. The abstract architect class is tightly bound to the maze data structures, and I defined it within the scope of maze, as a friend; it implements protected static methods that access the internal data of a maze.

Member Function Documentation

virtual void libcoyotl::maze::architect::create_floor_plan ( maze a_target)
pure virtual

This method "draws" in the given maze object, creating the floor plan.

Parameters
a_target- The maze that will be "architected".

Implemented in libcoyotl::recursive_maze_architect.

static cell** libcoyotl::maze::architect::get_cells ( maze a_target)
inlinestaticprotected

Retrieves the two-dimensional maze containing the cells for a maze. This function provides direct read-write access to the cell data.

Parameters
a_target- The target maze
Returns
A two-dimensional pointer to the cell grid

References libcoyotl::maze::m_cells.


The documentation for this class was generated from the following file:

© 1996-2005 Scott Robert Ladd. All rights reserved.
HTML documentation generated by Dimitri van Heesch's excellent Doxygen tool.