Class FormationTurn
java.lang.Object
megamek.common.game.AbstractPlayerTurn
megamek.common.autoResolve.component.AcTurn
megamek.common.autoResolve.component.FormationTurn
- All Implemented Interfaces:
Serializable,PlayerTurn
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisValid(SimulationContext game) Returns true when this turn can be played given the current state of the given game.booleanisValidEntity(InGameObject unit, IGame game) Methods inherited from class megamek.common.game.AbstractPlayerTurn
playerId, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface megamek.common.interfaces.PlayerTurn
isMultiTurn, isValid, isValid
-
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
Description copied from class:AcTurnReturns 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). -
isValidEntity
- Returns:
- true if the given unit may act in this turn
-