rl.centurion.game
Class CenturionGameTurn

java.lang.Object
  extended by rl.centurion.game.CenturionGameTurn
All Implemented Interfaces:
CenturionFiringRoundListener, CenturionMovementRoundListener, CenturionPaintingRoundListener

public class CenturionGameTurn
extends java.lang.Object
implements CenturionMovementRoundListener, CenturionPaintingRoundListener, CenturionFiringRoundListener


Nested Class Summary
static class CenturionGameTurn.CombatPhase
           
static class CenturionGameTurn.EndPhase
           
static class CenturionGameTurn.InitiativePhase
           
static class CenturionGameTurn.MovementPhase
           
static class CenturionGameTurn.TurnPhase
           
 
Constructor Summary
CenturionGameTurn(int turnNumber, CenturionGameSide sideOne, CenturionGameSide sideTwo, CenturionElementVisibility elementVisibility, CenturionBoard board)
           
 
Method Summary
 void addListener(CenturionGameTurnListener l)
           
 void completeTurn()
           
 void elementCompletedFiring(GameElementIdentifier element)
           
 void elementFiring(GameElementIdentifier element, GameElementIdentifier target)
           
 void elementFiringComplete(GameElementIdentifier element, boolean roundComplete)
           
 void elementMoved(Player p, GameElementIdentifier element)
           
 void elementPainting(GameElementIdentifier element, GameElementIdentifier target, boolean roundComplete)
           
 void elementsEligibleToFire(Player p, java.util.Vector<GameElementIdentifier> list)
           
 void elementsEligibleToPaint(Player p, java.util.Vector<GameElementIdentifier> list)
           
 void elementsRequiredToMove(Player p, java.util.Vector<GameElementIdentifier> elements)
           
 void firingPhaseCompleted()
           
 void firingPlayerSelectionRequired(CenturionGameSide side, java.util.Vector<Player> list)
           
 void firingRoundCompleted()
           
 void gameElementMoved(GameElement e, Location l)
           
 CenturionFiringRound getCurrentFiringRound()
           
 CenturionMovementRound getCurrentMovementRound()
           
 CenturionPaintingRound getCurrentPaintingRound()
           
 java.lang.String getPhase()
           
 java.lang.String getSubPhase()
           
 int getTurnNumber()
           
 boolean isTurnComplete()
           
 void movementPhaseCompleted()
           
 void movementRoundCompleted()
           
 void opportunityFireResponses(java.util.HashMap<GameElementIdentifier,java.util.HashMap<GameElementIdentifier,java.lang.Integer>> responses)
           
 void orderFireAttempt(FiringAttemptPacket packet)
           
 void orderPaintAttempt(GameElementIdentifier sourceElement, GameElementIdentifier targetElement)
           
 void paintingPhaseCompleted()
           
 void paintingPlayerSelectionRequired(CenturionGameSide side, java.util.Vector<Player> list)
           
 void paintingRoundCompleted()
           
 void pointDefenceAllocation(PointDefenceAllocation pda)
           
 void removeListener(CenturionGameTurnListener l)
           
 void resolveGameElementMovementOrders(MovementOrderSequence mos)
          Movement Order Resolution
protected  void resolveInfantrySquadMovementOrders(InfantrySquad is, MovementOrderSequence mos)
           
protected  void resolveVehicleMovementOrders(Vehicle v, MovementOrderSequence mos)
           
 void setMovementTeamOrder(java.lang.String teamName)
           
 void setSideOneCPAAllocated(int cpa)
           
 void setSideTwoCPAAllocated(int cpa)
           
 void startTurn()
           
 void teamAFiringRoundComplete()
           
 void teamAMovementRoundComplete()
           
 void teamAPaintingRoundComplete()
           
 void unitSelectionRequired(CenturionGameSide side, java.util.Vector<UnitIdentifier> list)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CenturionGameTurn

public CenturionGameTurn(int turnNumber,
                         CenturionGameSide sideOne,
                         CenturionGameSide sideTwo,
                         CenturionElementVisibility elementVisibility,
                         CenturionBoard board)
Method Detail

addListener

public void addListener(CenturionGameTurnListener l)

removeListener

public void removeListener(CenturionGameTurnListener l)

getTurnNumber

public int getTurnNumber()

getPhase

public java.lang.String getPhase()

getSubPhase

public java.lang.String getSubPhase()

isTurnComplete

public boolean isTurnComplete()

startTurn

public void startTurn()

completeTurn

public void completeTurn()

setSideOneCPAAllocated

public void setSideOneCPAAllocated(int cpa)

setSideTwoCPAAllocated

public void setSideTwoCPAAllocated(int cpa)

setMovementTeamOrder

public void setMovementTeamOrder(java.lang.String teamName)

getCurrentMovementRound

public CenturionMovementRound getCurrentMovementRound()

unitSelectionRequired

public void unitSelectionRequired(CenturionGameSide side,
                                  java.util.Vector<UnitIdentifier> list)
Specified by:
unitSelectionRequired in interface CenturionMovementRoundListener

elementsRequiredToMove

public void elementsRequiredToMove(Player p,
                                   java.util.Vector<GameElementIdentifier> elements)
Specified by:
elementsRequiredToMove in interface CenturionMovementRoundListener

elementMoved

public void elementMoved(Player p,
                         GameElementIdentifier element)
Specified by:
elementMoved in interface CenturionMovementRoundListener

opportunityFireResponses

public void opportunityFireResponses(java.util.HashMap<GameElementIdentifier,java.util.HashMap<GameElementIdentifier,java.lang.Integer>> responses)

teamAMovementRoundComplete

public void teamAMovementRoundComplete()
Specified by:
teamAMovementRoundComplete in interface CenturionMovementRoundListener

movementRoundCompleted

public void movementRoundCompleted()
Specified by:
movementRoundCompleted in interface CenturionMovementRoundListener

movementPhaseCompleted

public void movementPhaseCompleted()
Specified by:
movementPhaseCompleted in interface CenturionMovementRoundListener

gameElementMoved

public void gameElementMoved(GameElement e,
                             Location l)

getCurrentPaintingRound

public CenturionPaintingRound getCurrentPaintingRound()

paintingPlayerSelectionRequired

public void paintingPlayerSelectionRequired(CenturionGameSide side,
                                            java.util.Vector<Player> list)
Specified by:
paintingPlayerSelectionRequired in interface CenturionPaintingRoundListener

elementsEligibleToPaint

public void elementsEligibleToPaint(Player p,
                                    java.util.Vector<GameElementIdentifier> list)
Specified by:
elementsEligibleToPaint in interface CenturionPaintingRoundListener

teamAPaintingRoundComplete

public void teamAPaintingRoundComplete()
Specified by:
teamAPaintingRoundComplete in interface CenturionPaintingRoundListener

paintingRoundCompleted

public void paintingRoundCompleted()
Specified by:
paintingRoundCompleted in interface CenturionPaintingRoundListener

paintingPhaseCompleted

public void paintingPhaseCompleted()
Specified by:
paintingPhaseCompleted in interface CenturionPaintingRoundListener

orderPaintAttempt

public void orderPaintAttempt(GameElementIdentifier sourceElement,
                              GameElementIdentifier targetElement)

elementPainting

public void elementPainting(GameElementIdentifier element,
                            GameElementIdentifier target,
                            boolean roundComplete)
Specified by:
elementPainting in interface CenturionPaintingRoundListener

getCurrentFiringRound

public CenturionFiringRound getCurrentFiringRound()

firingPlayerSelectionRequired

public void firingPlayerSelectionRequired(CenturionGameSide side,
                                          java.util.Vector<Player> list)
Specified by:
firingPlayerSelectionRequired in interface CenturionFiringRoundListener

elementsEligibleToFire

public void elementsEligibleToFire(Player p,
                                   java.util.Vector<GameElementIdentifier> list)
Specified by:
elementsEligibleToFire in interface CenturionFiringRoundListener

teamAFiringRoundComplete

public void teamAFiringRoundComplete()
Specified by:
teamAFiringRoundComplete in interface CenturionFiringRoundListener

firingRoundCompleted

public void firingRoundCompleted()
Specified by:
firingRoundCompleted in interface CenturionFiringRoundListener

firingPhaseCompleted

public void firingPhaseCompleted()
Specified by:
firingPhaseCompleted in interface CenturionFiringRoundListener

orderFireAttempt

public void orderFireAttempt(FiringAttemptPacket packet)

elementCompletedFiring

public void elementCompletedFiring(GameElementIdentifier element)

elementFiring

public void elementFiring(GameElementIdentifier element,
                          GameElementIdentifier target)
Specified by:
elementFiring in interface CenturionFiringRoundListener

elementFiringComplete

public void elementFiringComplete(GameElementIdentifier element,
                                  boolean roundComplete)
Specified by:
elementFiringComplete in interface CenturionFiringRoundListener

pointDefenceAllocation

public void pointDefenceAllocation(PointDefenceAllocation pda)

resolveGameElementMovementOrders

public void resolveGameElementMovementOrders(MovementOrderSequence mos)
Movement Order Resolution


resolveVehicleMovementOrders

protected void resolveVehicleMovementOrders(Vehicle v,
                                            MovementOrderSequence mos)

resolveInfantrySquadMovementOrders

protected void resolveInfantrySquadMovementOrders(InfantrySquad is,
                                                  MovementOrderSequence mos)