de.adom.jade.world.maps
Class OutdoorMap
java.lang.Object
de.adom.jade.world.maps.Map
de.adom.jade.world.maps.OutdoorMap
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- SettlementMap
- public abstract class OutdoorMap
- extends Map
Defines an outdoor map. Outdoor maps will usually be finite although JADE
doesn't restrict this property. An infinite city might have a very special
charm :-)
- See Also:
- Serialized Form
|
Constructor Summary |
OutdoorMap(Location theLocation,
int theWidth,
int theHeight,
boolean finite)
Builds an outdoor map. |
|
Method Summary |
protected void |
placePool(int width,
int height,
int widthGrowth)
Creates a pool with a size defined in percent of the map size. |
protected void |
placeTrees(int percentage)
Places trees on the map. |
| 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 |
OutdoorMap
public OutdoorMap(Location theLocation,
int theWidth,
int theHeight,
boolean finite)
- Builds an outdoor map.
- Parameters:
theLocation - the location to which the map belongstheWidth - 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
placePool
protected void placePool(int width,
int height,
int widthGrowth)
- Creates a pool with a size defined in percent of the map size.
- Parameters:
width - the initial width in percent of the total widthheight - the initial height in percent of the total heightwidthGrowth - the growth factor (rng range) of the width with each step
placeTrees
protected void placeTrees(int percentage)
- Places trees on the map.
- Parameters:
percentage - specifies the percentage of the total map surface covered by trees