rl.common.game.elements
Interface MovementCapableElement

All Known Implementing Classes:
CapitalShip, InfantrySquad, Vehicle, VehicleCrew

public interface MovementCapableElement

This interface is implemented by elements that can be moved


Method Summary
 void applyMovementSummary(GameElementMovementSummary gems)
          applies the summary of movement to the element.
 boolean canMove(int turn)
          returns whether the element can move in a given turn
 GameElementMovementSummary getMovementSummary(int turn)
          return a new GameElementMovementSummary appropriate for the element implementing this interface
 boolean hasMoved(int turn)
          returns whether a unit has moved in a given turn
 void setMoved(int turn)
          sets the status of an element that has moved in a given turn
 

Method Detail

canMove

boolean canMove(int turn)
returns whether the element can move in a given turn

Parameters:
turn -
Returns:
whether the element is capable of being moved on the turn supplied

hasMoved

boolean hasMoved(int turn)
returns whether a unit has moved in a given turn

Parameters:
turn -
Returns:
if the element has moved on the turn supplied

setMoved

void setMoved(int turn)
sets the status of an element that has moved in a given turn

Parameters:
turn -

getMovementSummary

GameElementMovementSummary getMovementSummary(int turn)
return a new GameElementMovementSummary appropriate for the element implementing this interface


applyMovementSummary

void applyMovementSummary(GameElementMovementSummary gems)
applies the summary of movement to the element. This is to provide a synch between the element on the server and the one on the client.

Parameters:
gems -