rl.common.mapping
Class HexMap
java.lang.Object
rl.common.mapping.Map
rl.common.mapping.HexMap
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- CenturionMap, LeviathanMap
public abstract class HexMap
- extends Map
- See Also:
- Serialized Form
| Nested classes/interfaces inherited from class rl.common.mapping.Map |
Map.Edge |
|
Constructor Summary |
|
HexMap()
|
protected |
HexMap(int Width,
int Height)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
serialVersionUID
static final long serialVersionUID
- See Also:
- Constant Field Values
HexMap
public HexMap()
HexMap
protected HexMap(int Width,
int Height)
getHex
public MapHex getHex(int Index)
getHex
public MapHex getHex(int x,
int y)
getHex
public MapHex getHex(Coordinate coord)
getHexCount
public int getHexCount()
setHex
public void setHex(int Index,
MapHex Hex)
setHex
public void setHex(java.lang.String Index,
MapHex Hex)
setHex
public void setHex(int Column,
int Row,
MapHex Hex)
setSize
public abstract void setSize(int Width,
int Height)
throws java.lang.Exception
- Throws:
java.lang.Exception
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
isValidGameBoard
public boolean isValidGameBoard()
indexFor
protected int indexFor(java.lang.String hexNum)
getHexInDirection
public MapHex getHexInDirection(Coordinate c,
int direction)
- Code from Megamek
Gets the hex in the specified direction from the specified starting
coordinates.
getHexInDirection
public MapHex getHexInDirection(int x,
int y,
int direction)
- Code from Megamek
Gets the hex in the specified direction from the specified starting
coordinates.
Avoids calls to Coords.translated, and thus, object construction.
setDefaultHex
protected abstract void setDefaultHex(java.lang.String DefaultTerrain)