de.adom.jade.world.maps
Class UndergroundMap

java.lang.Object
  extended by de.adom.jade.world.maps.Map
      extended by de.adom.jade.world.maps.UndergroundMap
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
DungeonMap, MazeMap

public abstract class UndergroundMap
extends Map

Implements the base structures for all underground maps. Since dungeon maps are elaborated in subclasses this class cannot be instantiated but rather collects all required common methods to build dungeon maps.

All underground maps are build on even-numbered width and height. Should the parameters be odd numbers, they will be modified (increased) to be even. This is done to allow simpler dungeon construction by putting all rooms on even corner coordinates and making them of even width and height. Then - if all tunnels are placed on odd coordinates - the tunnels more easily connect to the rooms.

The following additional functionality is implicitly provided:

See Also:
Serialized Form

Constructor Summary
UndergroundMap(Location theLocation, int theWidth, int theHeight, boolean finite)
          Creates a new underground map.
 
Method Summary
 
Methods inherited from class de.adom.jade.world.maps.Map
addArea, addMapListener, attach, buildConnections, fireMapUpdated, getAreas, getBeing, getDirectionalXModifier, getDirectionalYModifier, getDistance, getDX, getDY, getHeight, getLocation, getMapView, getOpenBuilderTile, getRandomX, getRandomY, getSightRange, getTile, getVisibilityBlockadeLevel, getWidth, getWrappedX, getWrappedY, isDark, isEmpty, isFinite, isValidPosition, placeAreas, removeBeing, removeMapListener, setBeing, setDark, setPointOfView, setTile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UndergroundMap

public UndergroundMap(Location theLocation,
                      int theWidth,
                      int theHeight,
                      boolean finite)
Creates a new underground map. All parameters will be taken into account.

Parameters:
theLocation - the location to which the map belongs
theWidth - the width of the map (will be increased if necessary to even it)
theHeight - the height of the map (will be increased if necessary to even it)
finite - a flag indicating whether the map is finite or not