maze.structure
Class MazeFillerRetry

java.lang.Object
  extended bymaze.structure.MazeFiller
      extended bymaze.structure.MazeFillerRetry
Direct Known Subclasses:
MazeFillerKinked

public class MazeFillerRetry
extends MazeFiller

A MazeFiller which treats each collision as a branch node


Field Summary
 
Fields inherited from class maze.structure.MazeFiller
branch, theOpenEnds, theRNG
 
Constructor Summary
MazeFillerRetry()
          Constructs a new MazeFillerRetry.
MazeFillerRetry(PushPop p)
          Constructs a new MazeFillerRetry with the given PushPop; either a Stack or a Queue.
MazeFillerRetry(PushPop p, double b)
          Constructs a new MazeFillerRetry with the given PushPop (either a Stack or a Queue) and a given branching factor between 0.0 and 1.0.
 
Method Summary
 void finish(Maze m)
          Finishes the maze filling process.
 void start(Maze m)
          Starts filling the maze with Cells.
 
Methods inherited from class maze.structure.MazeFiller
branch, next, straight
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MazeFillerRetry

public MazeFillerRetry()
Constructs a new MazeFillerRetry. Uses a LIFO and 0.50 branching factor.


MazeFillerRetry

public MazeFillerRetry(PushPop p)
Constructs a new MazeFillerRetry with the given PushPop; either a Stack or a Queue. The branching factor is 0.50.

Parameters:
p - PushPop to use, either Stack or Queue.

MazeFillerRetry

public MazeFillerRetry(PushPop p,
                       double b)
Constructs a new MazeFillerRetry with the given PushPop (either a Stack or a Queue) and a given branching factor between 0.0 and 1.0.

Parameters:
p - PushPop to use, either Stack or Queue.
b - double branching factor between 0.0 and 1.0.
Method Detail

start

public void start(Maze m)
Starts filling the maze with Cells.

Overrides:
start in class MazeFiller
Parameters:
m - The Maze to fill.

finish

public void finish(Maze m)
Finishes the maze filling process.

Overrides:
finish in class MazeFiller
Parameters:
m - The Maze to fill.