Package megamek.common.turns
Class UnloadStrandedTurn
java.lang.Object
megamek.common.game.AbstractPlayerTurn
megamek.common.game.GameTurn
megamek.common.turns.UnloadStrandedTurn
- All Implemented Interfaces:
Serializable,PlayerTurn
A type of game turn that indicates that one or more players should be given the opportunity to unload entities that
are stranded on immobile transports. Each player declares which stranded units they will unload at the beginning of
the movement phase, without being told what stranded units their opponent(s) are unloading.
According to Randall Bills, the "minimum move" rule allow stranded units to dismount at the start of the turn [there used to be an ancient link to a forum post here].
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionUnloadStrandedTurn(int... ids) Any player that owns an entity whose ID is in the past array should be given a chance to unload it.UnloadStrandedTurn(Iterator<Entity> entities) Any player that owns an entity in the past enumeration should be given a chance to unload it. -
Method Summary
Methods inherited from class megamek.common.game.GameTurn
isMultiTurn, isValidEntity, isValidEntity, setMultiTurnMethods inherited from class megamek.common.game.AbstractPlayerTurn
playerIdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface megamek.common.interfaces.PlayerTurn
isValid
-
Constructor Details
-
UnloadStrandedTurn
public UnloadStrandedTurn(int... ids) Any player that owns an entity whose ID is in the past array should be given a chance to unload it.- Parameters:
ids- the array ofintIDs of stranded entities. This value must not benullor empty.- Throws:
IllegalArgumentException- if anullor empty value is passed for ids.
-
UnloadStrandedTurn
Any player that owns an entity in the past enumeration should be given a chance to unload it.- Parameters:
entities- theEnumerationof stranded entities. This value must not benullor empty.- Throws:
IllegalArgumentException- if anullor empty value is passed for entities.
-
-
Method Details
-
getEntityIds
public int[] getEntityIds() -
isValidEntity
Determine if the given entity is a valid one to use for this turn.- Overrides:
isValidEntityin classGameTurn- Parameters:
entity- theEntitybeing tested for the move.game- TheGamethe entity belongs to- Returns:
trueif the entity can be moved.
-
isValid
-
isValid
- Returns:
- true if the player is valid.
-
toString
- Overrides:
toStringin classAbstractPlayerTurn
-