|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmegamek.common.GameTurn
megamek.common.GameTurn.EntityClassTurn
public static class GameTurn.EntityClassTurn
A type of game turn that allows only certain types of units to move.
| 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.EntityClassTurn(int playerId,
int classMask)
Only allow entities for the given player which have types in the class mask to move. |
|
| Method Summary | |
|---|---|
boolean |
isValidClass(int classCode)
Determine if entities of the given class get to move. |
boolean |
isValidEntity(Entity entity,
IGame game)
Determine if the given entity is a valid one to use for this turn. |
| 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 |
|---|
public GameTurn.EntityClassTurn(int playerId,
int classMask)
playerId - the int ID of the playerclassMask - the int bitmask containing all the
valid class types for this move.| Method Detail |
|---|
public boolean isValidEntity(Entity entity,
IGame game)
isValidEntity in class GameTurnentity - the Entity being tested for the move.game - the IGame the entity belongs to
true if the entity can be moved.public boolean isValidClass(int classCode)
classCode - the int class code being tested
true if entities of that class can move.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||