net.sf.colossus.server
Class BattleMovementServerSide
java.lang.Object
net.sf.colossus.server.BattleMovementServerSide
public class BattleMovementServerSide
- extends java.lang.Object
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
Method Summary |
private java.util.Set<BattleHex> |
findMoves(BattleHex hex,
CreatureServerSide critter,
boolean flies,
int movesLeft,
int cameFrom,
boolean ignoreMobileAllies,
boolean first)
Recursively find moves from this hex. |
private java.util.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. |
(package private) BattleServerSide |
getBattleSS()
|
java.util.Set<BattleHex> |
showMoves(CreatureServerSide critter,
boolean ignoreMobileAllies)
Find all legal moves for this critter. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
game
private final Game game
cumulativeSlow
final boolean cumulativeSlow
oneHexAllowed
final boolean oneHexAllowed
BattleMovementServerSide
BattleMovementServerSide(IOptions options,
Game game)
findMoves
private java.util.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 java.util.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
public java.util.Set<BattleHex> showMoves(CreatureServerSide critter,
boolean ignoreMobileAllies)
- Find all legal moves for this critter.
getBattleSS
BattleServerSide getBattleSS()