com.basilv.examples.dom4j
Class Maze

java.lang.Object
  extended by com.basilv.examples.dom4j.Maze

public class Maze
extends Object

The maze is defined to be a certain # of squares wide and high. The coordinate system for squares is that the top left hand corner is (0,0). The maze can contain walls, which follow the grid.


Constructor Summary
Maze(int width, int height)
           
 
Method Summary
 void addWall(int startX, int startY, int endX, int endY)
           
 String getDescription()
           
 Dimension getSize()
           
 List<Wall> getWalls()
           
 void setDescription(String description)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Maze

public Maze(int width,
            int height)
Method Detail

getSize

public Dimension getSize()

addWall

public void addWall(int startX,
                    int startY,
                    int endX,
                    int endY)

getWalls

public List<Wall> getWalls()

getDescription

public String getDescription()

setDescription

public void setDescription(String description)


Java Examples available from http://www.basilv.com/psd/software Copyright © 2009 by Basil Vandegriend. All Rights Reserved.