rl.centurion.game
Class VehicleMovement

java.lang.Object
  extended by rl.centurion.game.ElementMovement
      extended by rl.centurion.game.VehicleMovement

public class VehicleMovement
extends ElementMovement


Constructor Summary
VehicleMovement(CenturionBoard board, Vehicle vehicle, VehicleLocation vl, int turn, java.util.Vector<GameElementLocationAffiliation> elementLocations)
           
 
Method Summary
 void addDamageSummary(GameElementDamageSummary geds)
           
 boolean applyAcceleration(int points)
           
 boolean applyAltitudeGain()
           
 boolean applyAltitudeLoss()
           
 boolean applyDeceleration(int points)
           
 boolean applyGrounding()
           
 boolean applyTurn()
           
 boolean canAccelerate()
           
 boolean canDecelerate()
           
 boolean canDisembarkInfantry()
           
 boolean canFireDiggingCannon()
           
 boolean canGainAltitude()
           
 boolean canGround()
           
 boolean canLoseAltitude()
           
 boolean canMoveStraight()
           
 boolean canOpportunityFire()
           
 boolean canTurn()
           
 boolean canTurnLeft()
           
 boolean canTurnRight()
           
 void clearListeners()
          This tells all of the Summary Objects to disconnect from the element they are listening to
 boolean declareOpportunityFire()
           
 boolean disembarkInfantry(GameElementIdentifier squad)
           
 boolean fireDiggingCannon()
           
 java.util.Vector<GameElementLocationAffiliation> getCarriedElements()
           
 Altitude getCurrentAltitude()
           
 int getCurrentVelocity()
           
 java.util.Vector<GameElementDamageSummary> getDamageSummaries()
           
 GameElement getElementFromIdentifier(GameElementIdentifier elementIdentifier)
           
 java.util.Vector<GameElement> getEligibleInfantrySquadsInVehicle()
           
 int getFacing(int facing)
           
 int getHexesMovedStraight()
           
 int getHexesToMoveStraight()
           
 Location getInfantrySquadLocationChange(GameElement squad, int index)
           
 java.util.Vector<GameElementLocationAffiliation> getInfantrySquadLocationChange(int index)
          This routine returns all of the infantry squads and their locations that changed on the movement index point.
 Location getLocation()
           
 java.util.Vector<Location> getLocations()
           
 GameElementMovementSummary getMovementSummary()
           
 int getThrust()
           
 int getThrustRemaining()
           
 int getThrustUsed()
           
 int getTurn()
           
 int getTurnCost(int velocity)
           
 Vehicle getVehicle()
           
 int getVelocityPointsRemaining()
           
 int getVelocityPointsUsed()
           
 boolean hasAccelerated()
           
 boolean hasDecelerated()
           
 boolean hasManouvered()
           
 boolean isGrounded()
           
 boolean isOnBoard()
           
 boolean moveStraight(int hexes, int velocityPoints)
           
 void pushInfantrySquadLocationChange(GameElement squad, Location isl)
           
 void removePendingMovement()
           
 void setLocation(Location csl)
           
 void setOffboard()
           
 
Methods inherited from class rl.centurion.game.ElementMovement
getCurrentLocation, getCurrentLocationIndex, getElement, getFinalLocation, getPreviousLocation, nextLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VehicleMovement

public VehicleMovement(CenturionBoard board,
                       Vehicle vehicle,
                       VehicleLocation vl,
                       int turn,
                       java.util.Vector<GameElementLocationAffiliation> elementLocations)
Method Detail

getVehicle

public Vehicle getVehicle()

getTurn

public int getTurn()

hasAccelerated

public boolean hasAccelerated()

hasDecelerated

public boolean hasDecelerated()

hasManouvered

public boolean hasManouvered()

getThrust

public int getThrust()

getThrustUsed

public int getThrustUsed()

getThrustRemaining

public int getThrustRemaining()

getCurrentVelocity

public int getCurrentVelocity()

getCurrentAltitude

public Altitude getCurrentAltitude()

getVelocityPointsUsed

public int getVelocityPointsUsed()

getVelocityPointsRemaining

public int getVelocityPointsRemaining()

getHexesMovedStraight

public int getHexesMovedStraight()

isGrounded

public boolean isGrounded()

canOpportunityFire

public boolean canOpportunityFire()

addDamageSummary

public void addDamageSummary(GameElementDamageSummary geds)

getDamageSummaries

public java.util.Vector<GameElementDamageSummary> getDamageSummaries()
Specified by:
getDamageSummaries in class ElementMovement

getMovementSummary

public GameElementMovementSummary getMovementSummary()
Specified by:
getMovementSummary in class ElementMovement

getHexesToMoveStraight

public int getHexesToMoveStraight()

getCarriedElements

public java.util.Vector<GameElementLocationAffiliation> getCarriedElements()

setLocation

public void setLocation(Location csl)

pushInfantrySquadLocationChange

public void pushInfantrySquadLocationChange(GameElement squad,
                                            Location isl)

getInfantrySquadLocationChange

public java.util.Vector<GameElementLocationAffiliation> getInfantrySquadLocationChange(int index)
This routine returns all of the infantry squads and their locations that changed on the movement index point. The movement index is the place in the movement that the InfantrySquad location changed.

Parameters:
index - The movement index
Returns:
The list of inafntry squads that moved at this index.

getInfantrySquadLocationChange

public Location getInfantrySquadLocationChange(GameElement squad,
                                               int index)

getLocation

public Location getLocation()

getLocations

public java.util.Vector<Location> getLocations()
Specified by:
getLocations in class ElementMovement

canAccelerate

public boolean canAccelerate()

canDecelerate

public boolean canDecelerate()

canTurn

public boolean canTurn()

canTurnLeft

public boolean canTurnLeft()

canTurnRight

public boolean canTurnRight()

canMoveStraight

public boolean canMoveStraight()

getFacing

public int getFacing(int facing)

canGainAltitude

public boolean canGainAltitude()

canLoseAltitude

public boolean canLoseAltitude()

canFireDiggingCannon

public boolean canFireDiggingCannon()

canGround

public boolean canGround()

canDisembarkInfantry

public boolean canDisembarkInfantry()

isOnBoard

public boolean isOnBoard()

applyAcceleration

public boolean applyAcceleration(int points)

applyDeceleration

public boolean applyDeceleration(int points)

applyTurn

public boolean applyTurn()

getTurnCost

public int getTurnCost(int velocity)

moveStraight

public boolean moveStraight(int hexes,
                            int velocityPoints)

applyAltitudeGain

public boolean applyAltitudeGain()

applyAltitudeLoss

public boolean applyAltitudeLoss()

applyGrounding

public boolean applyGrounding()

declareOpportunityFire

public boolean declareOpportunityFire()

fireDiggingCannon

public boolean fireDiggingCannon()

setOffboard

public void setOffboard()

disembarkInfantry

public boolean disembarkInfantry(GameElementIdentifier squad)

clearListeners

public void clearListeners()
This tells all of the Summary Objects to disconnect from the element they are listening to


getEligibleInfantrySquadsInVehicle

public java.util.Vector<GameElement> getEligibleInfantrySquadsInVehicle()

getElementFromIdentifier

public GameElement getElementFromIdentifier(GameElementIdentifier elementIdentifier)

removePendingMovement

public void removePendingMovement()
Specified by:
removePendingMovement in class ElementMovement