|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IBoard
| Method Summary | |
|---|---|
void |
addBoardListener(BoardListener listener)
Adds the specified board listener to receive board events from this board. |
void |
addInfernoTo(Coords coords,
InfernoTracker.Inferno round,
int hits)
Record that the given coordinates have recieved a hit from an inferno. |
void |
addSpecialHexDisplay(Coords coords,
SpecialHexDisplay shd)
|
boolean |
burnInferno(Coords coords)
Record that a new round of burning has passed for the given coordinates. |
void |
collapseBuilding(Building bldg)
The given building has collapsed. |
void |
collapseBuilding(Coords coords)
The given building hex has collapsed. |
void |
collapseBuilding(java.util.Vector<Coords> bldgs)
Collapse an array of buildings. |
boolean |
contains(Coords c)
Determines whether this Board "contains" the specified Coords. |
boolean |
contains(int x,
int y)
Determines whether this Board "contains" the specified Coords. |
Building |
getBuildingAt(Coords coords)
Get the building at the given coordinates. |
java.util.Enumeration<Building> |
getBuildings()
Get an enumeration of all buildings on the board. |
int |
getHeight()
|
IHex |
getHex(Coords c)
Returns the Hex at the specified Coords. |
IHex |
getHex(int x,
int y)
Determines if this Board contains the (x, y) Coords, and if so, returns the Hex at that position. |
java.util.Enumeration<Coords> |
getHexesAtDistance(Coords coords,
int distance)
|
IHex |
getHexInDir(Coords c,
int dir)
Gets the hex in the specified direction from the specified starting coordinates. |
IHex |
getHexInDir(int x,
int y,
int dir)
Gets the hex in the specified direction from the specified starting coordinates. |
java.util.Enumeration<Coords> |
getInfernoBurningCoords()
Get an enumeration of all coordinates with infernos still burning. |
int |
getInfernoBurnTurns(Coords coords)
Determine the remaining number of turns the given coordinates will have a burning inferno. |
int |
getInfernoIVBurnTurns(Coords coords)
Determine the remaining number of turns the given coordinates will have a burning Inferno IV round. |
java.util.Hashtable<Coords,InfernoTracker> |
getInfernos()
returns a hash of the inferno trackers |
int |
getMaxElevation()
Returns the highest elevation hex on the board. |
int |
getMinElevation()
Returns the lowest elevation hex on the board. |
boolean |
getRoadsAutoExit()
Get the current value of the "road auto-exit" option. |
java.util.Collection<SpecialHexDisplay> |
getSpecialHexDisplay(Coords coords)
This returns special events that should be makred on hexes, such as artilery fire. |
java.util.Hashtable<Coords,java.util.Collection<SpecialHexDisplay>> |
getSpecialHexDisplayTable()
|
int |
getType()
|
int |
getWidth()
|
boolean |
inAtmosphere()
|
void |
initializeAround(int x,
int y)
Initialize a hex and the hexes around it |
boolean |
inSpace()
|
boolean |
isInfernoBurning(Coords coords)
Determine if the given coordinates has a burning inferno. |
boolean |
isLegalDeployment(Coords c,
int nDir)
Can the player deploy an entity here? |
void |
load(java.io.InputStream is)
Loads this board from an InputStream |
void |
load(java.lang.String filename)
Loads this board from a filename in data/boards |
void |
newData(int width,
int height)
Creates a new data set for the board, with the specified dimensions; notifies listeners that a new data set has been created. |
void |
newData(int width,
int height,
IHex[] data)
Creates a new data set for the board, with the specified dimensions and data; notifies listeners that a new data set has been created. |
boolean |
onGround()
|
void |
removeBoardListener(BoardListener listener)
Removes the specified board listener. |
void |
removeInfernoFrom(Coords coords)
Extinguish inferno at the target hex. |
void |
resetStoredElevation()
Resets the Min and Max elevations to their default values. |
void |
save(java.io.OutputStream os)
Writes data for the board, as text to the OutputStream |
void |
setBridgeCF(int value)
Set the CF of bridges |
void |
setHex(Coords c,
IHex hex)
Sets the hex into the location specified by the Coords. |
void |
setHex(int x,
int y,
IHex hex)
Determines if this Board contains the (x, y) Coords, and if so, sets the specified Hex into that position and initializes it. |
void |
setRoadsAutoExit(boolean value)
Set the value of the "road auto-exit" option. |
void |
setSpecialHexDisplayTable(java.util.Hashtable<Coords,java.util.Collection<SpecialHexDisplay>> shd)
|
void |
setType(int t)
|
void |
updateBuildingCF(java.util.Vector<Building> bldgs)
Update the construction factors on an array of buildings. |
| Method Detail |
|---|
int getWidth()
int getHeight()
void newData(int width,
int height,
IHex[] data)
width - the width dimension.height - the height dimension.data - new hex data appropriate for the board.
void newData(int width,
int height)
width - the width dimension.height - the height dimension.
IHex getHex(int x,
int y)
x - the x Coords.y - the y Coords.
Hex, if this Board contains the (x, y)
location; null otherwise.
IHex getHexInDir(Coords c,
int dir)
c - starting coordinatesdir - direction
java.util.Enumeration<Coords> getHexesAtDistance(Coords coords,
int distance)
IHex getHexInDir(int x,
int y,
int dir)
x - starting x coordinatey - starting y coordinatedir - direction
void initializeAround(int x,
int y)
boolean contains(int x,
int y)
x - the x Coords.y - the y Coords.
true if the board contains the specified coordsboolean contains(Coords c)
c - the Coords.
true if the board contains the specified coordsIHex getHex(Coords c)
c - the Coords.
void setHex(int x,
int y,
IHex hex)
x - the x Coords.y - the y Coords.hex - the hex to be set into position.
void setHex(Coords c,
IHex hex)
c - the Coords.hex - the hex to be set into position.void addBoardListener(BoardListener listener)
listener - the board listener.void removeBoardListener(BoardListener listener)
listener - the board listener.
boolean isLegalDeployment(Coords c,
int nDir)
void addInfernoTo(Coords coords,
InfernoTracker.Inferno round,
int hits)
coords - - the Coords of the hit.round - - the kind of round that hit the hex.hits - - the int number of rounds that hit. If a
negative number is passed, then an
IllegalArgumentException will be thrown.void removeInfernoFrom(Coords coords)
coords - - the Coords of the hit.boolean isInfernoBurning(Coords coords)
coords - - the Coords being checked.
true if those coordinates have a burning inferno
round. false if no inferno has hit those
coordinates or if it has burned out.boolean burnInferno(Coords coords)
coords - - the Coords being checked.
true if those coordinates have a burning inferno
round. false if no inferno has hit those
coordinates or if it has burned out.java.util.Enumeration<Coords> getInfernoBurningCoords()
Enumeration of Coords that have
infernos still burning.java.util.Hashtable<Coords,InfernoTracker> getInfernos()
HashtableInfernoTrackers on the board.int getInfernoBurnTurns(Coords coords)
coords - - the Coords being checked. This value must
not be null. Unchecked.
int number of burn turns left for all infernos
This value will be non-negative.int getInfernoIVBurnTurns(Coords coords)
coords - - the Coords being checked. This value must
not be null. Unchecked.
int number of burn turns left for Arrow IV
infernos. This value will be non-negative.java.util.Collection<SpecialHexDisplay> getSpecialHexDisplay(Coords coords)
void addSpecialHexDisplay(Coords coords,
SpecialHexDisplay shd)
void setSpecialHexDisplayTable(java.util.Hashtable<Coords,java.util.Collection<SpecialHexDisplay>> shd)
java.util.Hashtable<Coords,java.util.Collection<SpecialHexDisplay>> getSpecialHexDisplayTable()
java.util.Enumeration<Building> getBuildings()
Enumeration of Buildings.Building getBuildingAt(Coords coords)
coords - - the Coords being examined.
Building object, if there is one at the given
coordinates, otherwise a null will be returned.void collapseBuilding(java.util.Vector<Coords> bldgs)
bldgs - - the Vector of Building
objects to be collapsed.void collapseBuilding(Building bldg)
bldg - - the Building that has collapsed.void collapseBuilding(Coords coords)
coords - - the Building that has collapsed.void updateBuildingCF(java.util.Vector<Building> bldgs)
bldgs - - the Vector of Building
objects to be updated.boolean getRoadsAutoExit()
true if roads should automatically exit onto all
adjacent pavement hexes. false otherwise.void setRoadsAutoExit(boolean value)
value - - The value to set for the option; true if
roads should automatically exit onto all adjacent pavement
hexes. false otherwise.void setBridgeCF(int value)
value - - The value to set the bridge CF to.void setType(int t)
int getType()
boolean onGround()
boolean inAtmosphere()
boolean inSpace()
void load(java.lang.String filename)
filename - filename to load fromvoid load(java.io.InputStream is)
is - input streamvoid save(java.io.OutputStream os)
os - output streamint getMinElevation()
int getMaxElevation()
void resetStoredElevation()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||