de.adom.jade.world
Class Dungeon

java.lang.Object
  extended by de.adom.jade.kernel.GUIDCarrier
      extended by de.adom.jade.world.Location
          extended by de.adom.jade.world.Dungeon
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
HugeDungeon

public class Dungeon
extends Location

Implements a dungeon meta structure.

See Also:
Serialized Form

Constructor Summary
Dungeon(java.lang.String unknownName, java.lang.String unknownDescription, java.lang.String knownName, java.lang.String knownDescription)
          Creates a new dungeon.
Dungeon(java.lang.String unknownName, java.lang.String unknownDescription, java.lang.String knownName, java.lang.String knownDescription, Map map)
          Creates a new dungeon.
 
Method Summary
protected  Map createMap()
          Creates a new map for this specific location.
protected  int getHeight()
          Returns the height for a given dungeon.
protected  int getWidth()
          Returns the width for a given dungeon.
 boolean isDungeon()
          Determines whether the current location is a dungeon.
 boolean isSettlement()
          Determines whether the current location is a settlement.
 boolean isSurfaceWorld()
          Determines whether the current location is the surface world area.
 boolean isWilderness()
          Determines whether the current location is a wilderness area.
 
Methods inherited from class de.adom.jade.world.Location
addConnection, getActorQueue, getComplex, getComplexID, getConnectionAt, getConnectionByID, getConnectionPositions, getConnections, getDescription, getLevel, getLogicalName, getMap, getName, getTickCounter, isKnown, setComplex, setKnown, setMap, updateTicks
 
Methods inherited from class de.adom.jade.kernel.GUIDCarrier
getGUID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dungeon

public Dungeon(java.lang.String unknownName,
               java.lang.String unknownDescription,
               java.lang.String knownName,
               java.lang.String knownDescription)
Creates a new dungeon. The creation of the actual map is deferred until the player enters the dungeon for the first time.

Parameters:
unknownName - the name of the dungeon in its unknown state
unknownDescription - the description of the dungeon in its unknown state
knownName - the name of the dungeon in its known state
knownDescription - the description of the dungeon in its known state
map - the map of the dungeon

Dungeon

public Dungeon(java.lang.String unknownName,
               java.lang.String unknownDescription,
               java.lang.String knownName,
               java.lang.String knownDescription,
               Map map)
Creates a new dungeon. The creation of the actual map is deferred until the player enters the dungeon for the first time.

Parameters:
unknownName - the name of the dungeon in its unknown state
unknownDescription - the description of the dungeon in its unknown state
knownName - the name of the dungeon in its known state
knownDescription - the description of the dungeon in its known state
Method Detail

isDungeon

public boolean isDungeon()
Description copied from class: Location
Determines whether the current location is a dungeon.

Specified by:
isDungeon in class Location
Returns:
a flag indicating whether the location is a dungeon
See Also:
Location.isDungeon()

isSettlement

public boolean isSettlement()
Description copied from class: Location
Determines whether the current location is a settlement.

Specified by:
isSettlement in class Location
Returns:
a flag indicating whether the location is a settlement
See Also:
Location.isSettlement()

isWilderness

public boolean isWilderness()
Description copied from class: Location
Determines whether the current location is a wilderness area.

Specified by:
isWilderness in class Location
Returns:
a flag indicating whether the location is a wilderness area
See Also:
Location.isWilderness()

isSurfaceWorld

public boolean isSurfaceWorld()
Description copied from class: Location
Determines whether the current location is the surface world area.

Specified by:
isSurfaceWorld in class Location
Returns:
a flag indicating whether the location is the surface world area
See Also:
Location.isSurfaceWorld()

createMap

protected Map createMap()
Description copied from class: Location
Creates a new map for this specific location.

Specified by:
createMap in class Location
Returns:
the newly created map for this location TODO: Make this method abstract so that derived classes can overload it.
See Also:
Location.createMap()

getWidth

protected int getWidth()
Returns the width for a given dungeon.

Returns:
the width for a given dungeon

getHeight

protected int getHeight()
Returns the height for a given dungeon.

Returns:
the height for a given dungeon