Class SBFPlayerTurn

All Implemented Interfaces:
Serializable, PlayerTurn

public class SBFPlayerTurn extends SBFTurn
This is a turn for a player action that does not use a unit (formation). Examples are minefield deployment, arty auto hex designation and others.
See Also:
  • Constructor Details

    • SBFPlayerTurn

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

    • isValidEntity

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

      public boolean isValid(SBFGame game)
      Description copied from class: SBFTurn
      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 SBFTurn
      Parameters:
      game - The game object
      Returns:
      True when the turn can be played, false when it should be skipped