net.sf.colossus.client
Class BattleMovement

java.lang.Object
  extended by net.sf.colossus.client.BattleMovement

final class BattleMovement
extends java.lang.Object

Class BattleMovement does client-side battle move calculations.

Author:
David Ripton, Romain Dolbeau

Field Summary
private  Client client
           
 
Constructor Summary
BattleMovement(Client client)
           
 
Method Summary
private  java.util.Set<BattleHex> findMoves(BattleHex hex, CreatureType creature, boolean flies, int movesLeft, int cameFrom, boolean first)
          Recursively find moves from this hex.
private  java.util.Set<BattleHex> 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.
 java.util.Set<BattleHex> showMoves(BattleCritter battleUnit)
          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
 

Field Detail

client

private final Client client
Constructor Detail

BattleMovement

BattleMovement(Client client)
Method Detail

findMoves

private java.util.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

private java.util.Set<BattleHex> 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

public java.util.Set<BattleHex> showMoves(BattleCritter battleUnit)
Find all legal moves for this critter.