public abstract class Movement
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected Game |
game |
private static java.util.logging.Logger |
LOGGER |
protected Options |
options |
Modifier and Type | Method and Description |
---|---|
protected static int |
findBlock(MasterHex hex) |
protected static EntrySide |
findEntrySide(MasterHex hex,
int cameFrom)
Set the entry side relative to the hex label.
|
protected java.util.Set<MasterHex> |
findNearbyUnoccupiedHexes(MasterHex hex,
Legion legion,
int roll,
int cameFrom)
Recursively find all unoccupied hexes within roll hexes, for
tower teleport.
|
java.util.Set<java.lang.String> |
findNormalMoves(MasterHex hex,
Legion legion,
int roll,
int block,
int cameFrom,
MasterHex fromHex,
boolean ignoreFriends)
Recursively find conventional moves from this hex.
|
java.lang.String |
isValidEntrySide(Legion legion,
MasterHex hex,
boolean teleport,
EntrySide entrySide)
Verify whether this is a valid entry side.
|
java.lang.String |
isValidNormalMove(Legion legion,
MasterHex hex,
Player player,
int roll)
Verify whether this is a valid normal move.
|
java.lang.String |
isValidTeleportMove(Legion legion,
MasterHex hex,
int roll)
Verify whether this is a valid teleport move.
|
java.util.Set<MasterHex> |
listAllMoves(Legion legion,
MasterHex hex,
int movementRoll)
Return set of hexLabels describing where this legion can move.
|
java.util.Set<MasterHex> |
listAllMoves(Legion legion,
MasterHex hex,
int movementRoll,
boolean inAdvance)
Return set of hexLabels describing where this legion can move.
|
java.util.Set<MasterHex> |
listNormalMoves(Legion legion,
MasterHex hex,
int movementRoll) |
java.util.Set<MasterHex> |
listNormalMoves(Legion legion,
MasterHex hex,
int movementRoll,
boolean ignoreFriends,
MasterHex fromHex,
boolean inAdvance)
Return set of hexLabels describing where this legion can move
without teleporting.
|
java.util.Set<EntrySide> |
listPossibleEntrySides(Legion legion,
MasterHex targetHex,
boolean teleport)
Return a Set of Strings "Left" "Right" or "Bottom" describing
possible entry sides.
|
java.util.Set<MasterHex> |
listTeleportMoves(Legion legion,
MasterHex hex,
int movementRoll)
Return set of hexLabels describing where this legion can teleport.
|
protected java.util.Set<MasterHex> |
listTeleportMoves(Legion legion,
MasterHex hex,
int movementRoll,
boolean inAdvance)
Return set of hexLabels describing where this legion can teleport.
|
boolean |
titanTeleportAllowed() |
protected boolean |
towerTeleportAllowed() |
protected boolean |
towerToNonTowerTeleportAllowed() |
protected boolean |
towerToTowerTeleportAllowed() |
private static final java.util.logging.Logger LOGGER
protected final Game game
protected final Options options
protected static EntrySide findEntrySide(MasterHex hex, int cameFrom)
protected static int findBlock(MasterHex hex)
protected java.util.Set<MasterHex> findNearbyUnoccupiedHexes(MasterHex hex, Legion legion, int roll, int cameFrom)
public boolean titanTeleportAllowed()
protected boolean towerTeleportAllowed()
protected boolean towerToTowerTeleportAllowed()
protected boolean towerToNonTowerTeleportAllowed()
protected java.util.Set<MasterHex> listTeleportMoves(Legion legion, MasterHex hex, int movementRoll, boolean inAdvance)
public java.util.Set<MasterHex> listTeleportMoves(Legion legion, MasterHex hex, int movementRoll)
public java.util.Set<EntrySide> listPossibleEntrySides(Legion legion, MasterHex targetHex, boolean teleport)
public java.util.Set<MasterHex> listAllMoves(Legion legion, MasterHex hex, int movementRoll)
public java.util.Set<MasterHex> listAllMoves(Legion legion, MasterHex hex, int movementRoll, boolean inAdvance)
public java.util.Set<MasterHex> listNormalMoves(Legion legion, MasterHex hex, int movementRoll)
public java.util.Set<MasterHex> listNormalMoves(Legion legion, MasterHex hex, int movementRoll, boolean ignoreFriends, MasterHex fromHex, boolean inAdvance)
public java.util.Set<java.lang.String> findNormalMoves(MasterHex hex, Legion legion, int roll, int block, int cameFrom, MasterHex fromHex, boolean ignoreFriends)
public java.lang.String isValidTeleportMove(Legion legion, MasterHex hex, int roll)
legion
- hex
- roll
- public java.lang.String isValidNormalMove(Legion legion, MasterHex hex, Player player, int roll)
legion
- hex
- player
- public java.lang.String isValidEntrySide(Legion legion, MasterHex hex, boolean teleport, EntrySide entrySide)
legion
- The moving legionhex
- The aimed target hexteleport
- Whether this is a teleported move