Class FormationTurn

All Implemented Interfaces:
Serializable, PlayerTurn

public class FormationTurn extends AcTurn
See Also:
  • Constructor Details

    • FormationTurn

      public FormationTurn(int playerId)
      Creates a new formation turn for an ACAR Game.
      Parameters:
      playerId - The player who has to take action
  • Method Details

    • isValid

      public boolean isValid(SimulationContext game)
      Description copied from class: AcTurn
      Returns true when this turn can be played given the current state of the given game. Should return false when e.g. no valid formation can be found to move for the player or the player or formation of the turn is null (e.g. because it has previously been destroyed).
      Specified by:
      isValid in class AcTurn
      Parameters:
      game - The game object
      Returns:
      True when the turn can be played, false when it should be skipped
    • isValidEntity

      public boolean isValidEntity(InGameObject unit, IGame game)
      Returns:
      true if the given unit may act in this turn