Package net.sf.colossus.variant
Class MasterHex
java.lang.Object
net.sf.colossus.variant.Hex
net.sf.colossus.variant.MasterHex
Class MasterHex describes one Masterboard hex, without GUI info.
- Author:
- David Ripton, Romain Dolbeau
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String[]
private final Constants.HexsideGates[]
TODO these base exit types and labels are somehow used only during setup of the MasterBoard, no real need to keep them around.private final Constants.HexsideGates[]
private final Constants.HexsideGates[]
private int
private final MasterHex[]
private final MasterBoardTerrain
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
findDirectionForEntrySide
(EntrySide wantedEntrySide) For a given EntrySide, find out which direction that means.getBaseExitLabel
(int i) getBaseExitType
(int i) getEntranceType
(int i) getExitType
(int i) int
getNeighbor
(int i) void
setBaseExitLabel
(int i, String label) void
setBaseExitType
(int i, Constants.HexsideGates exitType) void
setEntranceType
(int i, Constants.HexsideGates entranceType) void
setExitType
(int i, Constants.HexsideGates exitType) void
setLabelSide
(int labelSide) (package private) void
setNeighbor
(int i, MasterHex hex)
-
Field Details
-
neighbors
-
labelSide
private int labelSide -
exitType
-
entranceType
-
baseExitType
TODO these base exit types and labels are somehow used only during setup of the MasterBoard, no real need to keep them around. It seems to be related to the fact that the master board hexes are really triangles and stored as such in the XML files. Maybe they should not be hexes in the code either. -
baseExitLabel
-
terrain
-
-
Constructor Details
-
MasterHex
-
-
Method Details
-
getTerrain
-
getTerrainName
- Specified by:
getTerrainName
in classHex
-
getTerrainDisplayName
-
getTerrainColor
-
getNeighbor
-
setNeighbor
-
getLabelSide
public int getLabelSide() -
findDirectionForEntrySide
For a given EntrySide, find out which direction that means. Caller can use that e.g. to figure out what is the neighbor hex from where an attacker is coming TODO should this rather be somewhere else? Since it uses entryside, it makes variant package depending on game package ...- Parameters:
wantedEntrySide
-- Returns:
- The direction towards which that entryside is placed
-
setLabelSide
public void setLabelSide(int labelSide) -
getExitType
-
setExitType
-
getBaseExitType
-
setBaseExitType
-
getBaseExitLabel
-
setBaseExitLabel
-
getEntranceType
-
setEntranceType
-