001// Copyright 2002 by Basil Vandegriend.  All rights reserved.
002
003package com.basilv.examples.dom4j;
004
005import java.awt.Dimension;
006import java.util.*;
007
008/**
009 * The maze is defined to be a certain # of squares wide and high. The
010 * coordinate system for squares is that the top left hand corner is (0,0).
011 * The maze can contain walls, which follow the grid.
012 */
013public class Maze
014{
015  private Dimension size;
016
017  private List<Wall> walls = new ArrayList<Wall>();
018
019  private String description;
020
021  public Maze(int width, int height) {
022    size = new Dimension(width, height);
023  }
024
025  public Dimension getSize() {
026    return size;
027  }
028
029  public void addWall(int startX, int startY, int endX, int endY) {
030    walls.add(new Wall(startX, startY, endX, endY));
031  }
032
033  public List<Wall> getWalls() {
034    return walls;
035  }
036
037  public String getDescription() {
038    return description;
039  }
040
041  public void setDescription(String description) {
042    this.description = description;
043  }
044
045}