megamek.common
Class GameTurn.SpecificEntityTurn

java.lang.Object
  extended by megamek.common.GameTurn
      extended by megamek.common.GameTurn.SpecificEntityTurn
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
GameTurn.CounterGrappleTurn, GameTurn.TriggerAPPodTurn, GameTurn.TriggerBPodTurn
Enclosing class:
GameTurn

public static class GameTurn.SpecificEntityTurn
extends GameTurn

A type of game turn that allows only one specific entity to move.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class megamek.common.GameTurn
GameTurn.CounterGrappleTurn, GameTurn.EntityClassTurn, GameTurn.SpecificEntityTurn, GameTurn.TriggerAPPodTurn, GameTurn.TriggerBPodTurn, GameTurn.UnitNumberTurn, GameTurn.UnloadStrandedTurn
 
Field Summary
 
Fields inherited from class megamek.common.GameTurn
CLASS_AERO, CLASS_DROPSHIP, CLASS_GUN_EMPLACEMENT, CLASS_INFANTRY, CLASS_JUMPSHIP, CLASS_MECH, CLASS_PROTOMECH, CLASS_SMALL_CRAFT, CLASS_SPACE_STATION, CLASS_TANK, CLASS_WARSHIP
 
Constructor Summary
GameTurn.SpecificEntityTurn(int playerId, int entityId)
           
 
Method Summary
 int getEntityNum()
           
 boolean isValidEntity(Entity entity, IGame game)
          Returns true if the entity is normally valid and it is the specific entity that can move this turn.
 void setEntityNum(int entityId)
           
 
Methods inherited from class megamek.common.GameTurn
getClassCode, getPlayerNum, isValid, isValid, setPlayerNum, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GameTurn.SpecificEntityTurn

public GameTurn.SpecificEntityTurn(int playerId,
                                   int entityId)
Method Detail

getEntityNum

public int getEntityNum()

setEntityNum

public void setEntityNum(int entityId)

isValidEntity

public boolean isValidEntity(Entity entity,
                             IGame game)
Returns true if the entity is normally valid and it is the specific entity that can move this turn.

Overrides:
isValidEntity in class GameTurn
Parameters:
entity - the Entity that may take this turn.
game - the IGame this turn belongs to.
Returns:
true if the specified entity can take this turn. false if the entity is not valid for this turn.