Class BattleMovement
java.lang.Object
net.sf.colossus.client.BattleMovement
Class BattleMovement does client-side battle move calculations.
- Author:
- David Ripton, Romain Dolbeau
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final booleanprivate final Game(package private) final boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindMoves(BattleHex hex, CreatureType creature, boolean flies, int movesLeft, int cameFrom, boolean first) Recursively find moves from this hex.This method is called by the defender on turn 1 in a Startlisted Terrain, so we know that there are no enemies on board, and all allies are mobile.showMoves(BattleCritter critter) Find all legal moves for this critter.
-
Field Details
-
game
-
cumulativeSlow
final boolean cumulativeSlow -
oneHexAllowed
final boolean oneHexAllowed
-
-
Constructor Details
-
BattleMovement
-
-
Method Details
-
findMoves
private Set<BattleHex> findMoves(BattleHex hex, CreatureType creature, boolean flies, int movesLeft, int cameFrom, boolean first) Recursively find moves from this hex. Return a set of all legal destinations. Do not double back. -
findUnoccupiedStartlistHexes
This method is called by the defender on turn 1 in a Startlisted Terrain, so we know that there are no enemies on board, and all allies are mobile. -
showMoves
Find all legal moves for this critter.
-