Package net.sf.colossus.server
Class BattleMovementServerSide
java.lang.Object
net.sf.colossus.server.BattleMovementServerSide
This holds currently the BattleMovement related methods that has
been so far part of BattleServerSide.
TODO Further clean up, and unify with client.BattleMovement, and
eventually move up to game.
The client side version is in better shape, but some of the methods
it uses from "game" package classes are abstract in game package and in
server package classes they are only dummies!
- Author:
- David Ripton (BattleServerSide), Romain Dolbeau (BattleServerSide), Clemens Katzer
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final boolean
private final Game
(package private) final boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindMoves
(BattleHex hex, CreatureServerSide critter, boolean flies, int movesLeft, int cameFrom, boolean ignoreMobileAllies, boolean first) Recursively find moves from this hex.findUnoccupiedStartlistHexes
(boolean ignoreMobileAllies, MasterBoardTerrain terrain) 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.(package private) BattleServerSide
showMoves
(CreatureServerSide critter, boolean ignoreMobileAllies) Find all legal moves for this critter.
-
Field Details
-
game
-
cumulativeSlow
final boolean cumulativeSlow -
oneHexAllowed
final boolean oneHexAllowed
-
-
Constructor Details
-
BattleMovementServerSide
-
-
Method Details
-
findMoves
private Set<BattleHex> findMoves(BattleHex hex, CreatureServerSide critter, boolean flies, int movesLeft, int cameFrom, boolean ignoreMobileAllies, boolean first) Recursively find moves from this hex. Return a set of string hex IDs for all legal destinations. Do not double back. If ignoreMobileAllies is true, pretend that allied creatures that can move out of the way are not there. -
findUnoccupiedStartlistHexes
private Set<BattleHex> findUnoccupiedStartlistHexes(boolean ignoreMobileAllies, MasterBoardTerrain terrain) 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. -
getBattleSS
BattleServerSide getBattleSS()
-