games.strategy.triplea.delegate.remote
Interface IMoveDelegate

All Superinterfaces:
IRemote
All Known Implementing Classes:
MoveDelegate

public interface IMoveDelegate
extends IRemote

Remote interface for MoveDelegate

Author:
Sean Bridges

Method Summary
 java.util.List<UndoableMove> getMovesMade()
          Get the moves already made
 java.util.Collection<Territory> getTerritoriesWhereAirCantLand()
          Get what air units must move before the end of the players turn
 java.util.Collection<Territory> getTerritoriesWhereUnitsCantFight()
          Get what units must have combat ability
 java.lang.String loadBombers(java.util.Collection<Unit> units, Route route, java.util.Collection<Unit> m_bombersThatCanBeLoaded)
           
 java.lang.String move(java.util.Collection<Unit> units, Route route)
          equivalent to move(units, route, Collections.EMPTY_LIST)
 java.lang.String move(java.util.Collection<Unit> units, Route route, java.util.Collection<Unit> m_transportsThatCanBeLoaded)
           
 java.lang.String undoMove(int moveIndex)
           
 

Method Detail

move

java.lang.String move(java.util.Collection<Unit> units,
                      Route route,
                      java.util.Collection<Unit> m_transportsThatCanBeLoaded)
Parameters:
units - - the units to move
route - - the route to move along
m_transportsThatCanBeLoaded - - transports that can be loaded while moving, must be non null
Returns:
an error message if the move cant be made, null otherwise

loadBombers

java.lang.String loadBombers(java.util.Collection<Unit> units,
                             Route route,
                             java.util.Collection<Unit> m_bombersThatCanBeLoaded)
Parameters:
units - - the units to move
route - - the route to move along
m_bombersThatCanBeLoaded - - bombers that can be loaded while moving, must be non null
Returns:
an error message if the move cant be made, null otherwise

move

java.lang.String move(java.util.Collection<Unit> units,
                      Route route)
equivalent to move(units, route, Collections.EMPTY_LIST)

Parameters:
units - - the units to move
route - - the route to move along
Returns:
an error message if the move cant be made, null otherwise

getMovesMade

java.util.List<UndoableMove> getMovesMade()
Get the moves already made

Returns:
a list of UndoableMoves

undoMove

java.lang.String undoMove(int moveIndex)
Parameters:
moveIndex - - an index in the list getMovesMade
Returns:
an error string if the move could not be undone, null otherwise

getTerritoriesWhereAirCantLand

java.util.Collection<Territory> getTerritoriesWhereAirCantLand()
Get what air units must move before the end of the players turn

Returns:
a list of Territories with air units that must move

getTerritoriesWhereUnitsCantFight

java.util.Collection<Territory> getTerritoriesWhereUnitsCantFight()
Get what units must have combat ability

Returns:
a list of Territories with units that can't fight