|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IGame
This interface is the root of all data about the game in progress. Both the Client and the Server should have one of these objects and it is their job to keep it synched. note from itmo: this needs WAY MORE javadoc. also preferably remove the abstract-modifiers and divide this interface into two subinterfaces for reading and modifying. -stuff should be documented as contracts. bad example of javadoccing found in getVictory* ... also phases should be documented. wtf is an exchange-phase?
| Nested Class Summary | |
|---|---|
static class |
IGame.Phase
|
| Method Summary | |
|---|---|
int |
actionsSize()
|
void |
addAction(EntityAction ea)
Adds the specified action to the actions list for this phase. |
void |
addAttack(AttackHandler ah)
|
void |
addCharge(AttackAction ea)
Adds a pending displacement attack to the list for this phase. |
void |
addControlRoll(PilotingRollData control)
Adds a pending control roll to the list for this phase. |
void |
addEntity(int id,
Entity entity)
|
void |
addExtremeGravityPSR(PilotingRollData psr)
Adds a pending extreme Gravity PSR to the list for this phase. |
void |
addFlare(Flare flare)
Add a new flare |
void |
addGameListener(GameListener listener)
Adds the specified game listener to receive board events from this Game. |
void |
addInitiativeRerollRequest(Team t)
|
void |
addMinefield(Minefield mf)
Addds the specified minefield |
void |
addMinefields(java.util.Vector<Minefield> minefields)
Adds a number of minefields |
void |
addPlayer(int id,
Player player)
|
void |
addPSR(PilotingRollData psr)
Adds a pending PSR to the list for this phase. |
void |
addRam(AttackAction ea)
Adds a pending ram attack to the list for this phase. |
void |
addReports(java.util.Vector<Report> v)
Adds the given reports vector to the GameReport collection. |
void |
addSmokeCloud(SmokeCloud cloud)
add a smoke cloud to the list of smoke clouds |
void |
addTagInfo(TagInfo info)
add the results of one tag attack |
void |
addTeleMissileAttack(AttackAction ea)
Adds a pending tele-missile attack to the list for this phase. |
void |
addVibrabomb(Minefield mf)
Addds the specified vibrabomb |
java.util.Vector<Report> |
ageFlares()
Age the flare list and remove any which have burnt out Artillery flares drift with wind. |
GameTurn |
changeToNextTurn()
Changes to the next turn, returning it. |
void |
checkForCompleteDeployment()
Checks to see if we've past our deployment completion |
boolean |
checkForMagneticClamp()
Check each player for the presence of a Battle Armor squad equipped with a Magnetic Clamp. |
boolean |
checkForValidDropships(int playerId)
|
boolean |
checkForValidJumpships(int playerId)
|
boolean |
checkForValidNonInfantryAndOrProtomechs(int playerId)
Returns true if the player has any valid units this turn that are not infantry, not protomechs, or not either of those. |
boolean |
checkForValidSmallCraft(int playerId)
|
boolean |
checkForValidSpaceStations(int playerId)
|
boolean |
checkForValidWarships(int playerId)
|
void |
clearAllReports()
Clears out all the current reports, paving the way for a new game. |
void |
clearDeploymentThisRound()
Clear this round from this list of entities to deploy |
void |
clearMinefields()
Removes all minefields |
void |
clearTagInfoShots(Entity ae,
Coords tc)
clears the "shots" attribute of all TagInfos where attacker is on same team as ae and target is on same mapsheet as tc |
boolean |
containsMinefield(Coords coords)
Check if there is a minefield at given coords |
boolean |
containsVibrabomb(Minefield mf)
Checks if the game contains the specified Vibrabomb |
void |
createVictoryConditions()
use victoryfactory to generate a new victorycondition checker provided that the victorycontext is saved properly, calling this method at any time is ok and should not affect anything unless the victorycondition-configoptions have changed. |
void |
end(int winner,
int winnerTeam)
|
boolean |
gameTimerIsExpired()
|
java.util.Enumeration<EntityAction> |
getActions()
Returns an Enumeration of actions scheduled for this phase. |
java.util.Vector<EntityAction> |
getActionsVector()
Returns the actions vector. |
Entity |
getAffaTarget(Coords c,
Entity ignore)
Returns a Target for an Accidental Fall From above, or null if no possible target is there |
int |
getAllEntitiesOwnedBy(Player player)
Returns the number of entities owned by the player, regardless of their status. |
java.util.Vector<java.util.Vector<Report>> |
getAllReports()
Returns a vector of all the reports. |
java.util.Enumeration<ArtilleryAttackAction> |
getArtilleryAttacks()
|
int |
getArtillerySize()
|
java.util.Enumeration<AttackHandler> |
getAttacks()
|
java.util.Vector<AttackHandler> |
getAttacksVector()
|
IBoard |
getBoard()
|
java.util.Vector<Entity> |
getC3NetworkMembers(Entity entity)
Returns a Vector containing the Entitys
that are in the same C3 network as the passed-in unit. |
java.util.Vector<Entity> |
getC3SubNetworkMembers(Entity entity)
Returns a Vector containing the Entitys
that are in the C3 sub-network under the passed-in unit. |
java.util.Enumeration<AttackAction> |
getCharges()
Returns an Enumeration of displacement attacks scheduled for the end of the physical phase. |
java.util.Vector<AttackAction> |
getChargesVector()
Returns the charges vector. |
java.util.Enumeration<PilotingRollData> |
getControlRolls()
Returns an Enumeration of pending Control roll. |
java.util.Enumeration<Entity> |
getDevastatedEntities()
Returns an enumeration of entities that were utterly destroyed |
java.util.Enumeration<Entity> |
getEnemyEntities(Coords c,
Entity currentEntity)
Returns an Enumeration of the enemy's active entities at
the given coordinates. |
java.util.Enumeration<Entity> |
getEntities()
Returns an enumeration of all the entites in the game. |
java.util.Enumeration<Entity> |
getEntities(Coords c)
Returns an Enumeration of the active entities at the given coordinates. |
int |
getEntitiesOwnedBy(Player player)
Returns the number of entities owned by the player, regardless of their status, as long as they are in the game. |
java.util.Vector<Entity> |
getEntitiesVector()
Returns the actual vector for the entities |
java.util.Vector<Entity> |
getEntitiesVector(Coords c)
Returns a Vector of the active entities at the given coordinates. |
Entity |
getEntity(int id)
Returns the entity with the given id number, if any. |
int |
getExternalGameId()
|
java.util.Enumeration<PilotingRollData> |
getExtremeGravityPSRs()
Returns an Enumeration of pending extreme GravityPSRs. |
int |
getFirstDeployableEntityNum()
Returns the number of the first deployable entity |
int |
getFirstDeployableEntityNum(GameTurn turn)
|
Entity |
getFirstEnemyEntity(Coords c,
Entity currentEntity)
Returns the first enemy entity at the given coordinate, if any. |
Entity |
getFirstEntity()
Returns the first entity that can act in the present turn, or null if none can. |
Entity |
getFirstEntity(Coords c)
Returns the first entity at the given coordinate, if any. |
Entity |
getFirstEntity(GameTurn turn)
Returns the first entity that can act in the specified turn, or null if none can.33 |
int |
getFirstEntityNum()
Returns the id of the first entity that can act in the current turn, or -1 if none can. |
int |
getFirstEntityNum(GameTurn turn)
Returns the id of the first entity that can act in the specified turn, or -1 if none can. |
java.util.Vector<Flare> |
getFlares()
Get a list of flares |
java.util.Enumeration<Entity> |
getFriendlyEntities(Coords c,
Entity currentEntity)
Returns an Enumeration of friendly active entities at the
given coordinates. |
java.util.Vector<GameListener> |
getGameListeners()
Returns all the GameListeners. |
java.util.Enumeration<Entity> |
getGraveyardEntities()
Returns an enumeration of salvagable entities. |
java.util.Vector<GunEmplacement> |
getGunEmplacements(Coords c)
Returns a Vector of the gun emplacements at the given coordinates. |
int |
getInfantryLeft(int playerId)
Returns the number of remaining selectable infantry owned by a player. |
IGame.Phase |
getLastPhase()
|
int |
getLiveCommandersOwnedBy(Player player)
Returns the number of non-destroyed deployed entities owned by the player. |
int |
getLiveDeployedEntitiesOwnedBy(Player player)
Returns the number of non-destroyed deployed entities owned by the player. |
int |
getLiveEntitiesOwnedBy(Player player)
Returns the number of non-destroyed entityes owned by the player |
java.util.Enumeration<Coords> |
getMinedCoords()
Get the coordinates of all mined hexes in the game. |
java.util.Vector<Minefield> |
getMinefields(Coords coords)
Get the minefields at specified coords |
int |
getNbrMinefields(Coords coords)
Get the number of the minefields at specified coords |
java.util.Enumeration<Entity> |
getNemesisTargets(Entity attacker,
Coords target)
Get Entities that have have a iNarc Nemesis pod attached and are situated between two Coords |
int |
getNextDeployableEntityNum(GameTurn turn,
int start)
|
int |
getNextDeployableEntityNum(int entityId)
Returns the number of the next deployable entity |
Entity |
getNextEntity(int start)
Returns the next selectable entity that can act this turn, or null if none can. |
Entity |
getNextEntityFromList(Entity current)
Returns the next entity from the master list of entities. |
int |
getNextEntityId()
|
int |
getNextEntityNum(GameTurn turn,
int start)
Returns the entity id of the next entity that can move during the specified |
int |
getNextEntityNum(int start)
Returns the next selectable entity ID that can act this turn, or null if none can. |
int |
getNoOfEntities()
Return the current number of entities in the game. |
int |
getNoOfInitiativeRerollRequests()
|
int |
getNoOfPlayers()
Return the current number of active players in the game. |
int |
getNoOfTeams()
Return the current number of teams in the game. |
GameOptions |
getOptions()
|
java.util.Vector<Entity> |
getOutOfGameEntitiesVector()
Returns the actual vector for the out-of-game entities |
Entity |
getOutOfGameEntity(int id)
Returns an out-of-game entity. |
IGame.Phase |
getPhase()
|
PlanetaryConditions |
getPlanetaryConditions()
|
Player |
getPlayer(int id)
Returns the individual player assigned the id parameter. |
java.util.ArrayList<Entity> |
getPlayerEntities(Player player,
boolean hide)
Get the entities for the player. |
java.util.Enumeration<Player> |
getPlayers()
Return an enumeration of player in the game |
java.util.Vector<Player> |
getPlayersVector()
Return the players vector |
java.util.Hashtable<Coords,java.util.Vector<Entity>> |
getPositionMap()
Returns a Hashtable that maps the Coords of
each unit in this Game to a Vector of
Entitys at that positions. |
Entity |
getPreviousEntityFromList(Entity current)
Returns the previous entity from the master list of entities. |
int |
getProtomechsLeft(int playerId)
Returns the number of remaining selectable Protomechs owned by a player. |
java.util.Enumeration<PilotingRollData> |
getPSRs()
Returns an Enumeration of pending PSRs. |
java.util.Enumeration<AttackAction> |
getRams()
Returns an Enumeration of ram attacks scheduled for the end of the physical phase. |
java.util.Vector<AttackAction> |
getRamsVector()
Returns the ram vector. |
java.util.Vector<Report> |
getReports(int r)
Returns a vector of reports for the given round. |
java.util.Enumeration<Entity> |
getRetreatedEntities()
Returns an enumeration of entities that have retreated |
int |
getRoundCount()
Getter for property roundCount. |
java.util.Enumeration<Entity> |
getSelectedEntities(EntitySelector selector)
Get all Entitys that pass the given selection criteria. |
int |
getSelectedEntityCount(EntitySelector selector)
Count all Entitys that pass the given selection criteria. |
java.util.Enumeration<Entity> |
getSelectedOutOfGameEntities(EntitySelector selector)
Get all out-of-game Entitys that pass the given selection
criteria. |
int |
getSelectedOutOfGameEntityCount(EntitySelector selector)
Count all out-of-game Entitys that pass the given
selection criteria. |
java.util.List<SmokeCloud> |
getSmokeCloudList()
get the list of smokeclouds |
java.util.Vector<TagInfo> |
getTagInfo()
Returns this turn's tag information |
Targetable |
getTarget(int nType,
int nID)
Returns the appropriate target for this game given a type and id |
Team |
getTeamForPlayer(Player p)
Return a players team Note: may return null if player has no team |
java.util.Enumeration<Team> |
getTeams()
Return an enumeration of teams in the game |
java.util.Vector<Team> |
getTeamsVector()
Return the immutable vector of teams |
java.util.Enumeration<AttackAction> |
getTeleMissileAttacks()
Returns an Enumeration of telemissile attacks scheduled for the end of the physical phase. |
java.util.Vector<AttackAction> |
getTeleMissileAttacksVector()
Returns the telemissile attack vector. |
GameTurn |
getTurn()
Returns the current GameTurn object |
GameTurn |
getTurnForPlayer(int pn)
|
int |
getTurnIndex()
Returns the current turn index |
java.util.Enumeration<GameTurn> |
getTurns()
Returns an Enumeration of the current turn list |
java.util.Vector<GameTurn> |
getTurnVector()
Returns the current turn vector |
java.util.Vector<Entity> |
getUndeployedEntities()
Returns a vector of entities that have not yet deployed |
java.util.Vector<Entity> |
getValidTargets(Entity entity)
Get a vector of entity objects that are "acceptable" to attack with this entity |
int |
getVehiclesLeft(int playerId)
Returns the number of remaining selectable Vehicles owned by a player. |
java.util.Vector<Minefield> |
getVibrabombs()
|
Victory |
getVictory()
|
java.util.HashMap<java.lang.String,java.lang.Object> |
getVictoryContext()
|
int |
getVictoryPlayerId()
Getter for property victoryPlayerId. itmo: apparently this is the guy who claims to have won the game also used to tell who won when the game is won |
int |
getVictoryTeam()
Getter for property victoryTeam. corresponding claiming/winning team if the player is in a team |
java.util.Enumeration<Entity> |
getWreckedEntities()
Returns an enumeration of wrecked entities. |
boolean |
hasEntity(int entityId)
|
boolean |
hasMoreTurns()
Returns true if there is a turn after the current one |
boolean |
hasTacticalGenius(Player player)
Returns true if the player has a valid unit with the Tactical Genius pilot special ability. |
void |
incrementRoundCount()
Increments the round counter |
void |
insertNextTurn(GameTurn turn)
Inserts a turn that will come directly after the current one |
boolean |
isDeploymentComplete()
|
boolean |
isEntityStranded(Entity entity)
Determines if the indicated entity is stranded on a transport that can't move. |
boolean |
isForceVictory()
Getter for property forceVictory. this tells us that a claim for victory is active. |
boolean |
isOutOfGame(Entity entity)
See if the Entity is out of the game. |
boolean |
isOutOfGame(int id)
See if the Entity with the given ID is out of the game. |
boolean |
isPhaseSimultaneous()
|
boolean |
isPlayerVictor(int playerId)
Shortcut to isPlayerVictor(Player player) |
boolean |
isPlayerVictor(Player player)
Returns true if the specified player is either the victor, or is on the winning team. |
boolean |
isPositionIlluminated(Coords c)
returns true if the hex is illuminated by a flare |
void |
moveToGraveyard(int id)
Moves an entity into the graveyard so it stops getting sent out every phase. |
boolean |
phaseHasTurns(IGame.Phase phase)
Returns true if this phase has turns. |
void |
processGameEvent(GameEvent event)
Processes game events by dispatching them to any registered GameListener objects. |
void |
purgeGameListeners()
purges all Game Listener objects. |
void |
removeAction(java.lang.Object o)
Remove a specified action |
void |
removeActionsFor(int entityId)
Removes all actions by the specified entity |
void |
removeAttack(AttackHandler ah)
|
void |
removeEntity(int id,
int condition)
Remove an entity from the master list. |
GameTurn |
removeFirstTurnFor(Entity entity)
Removes the first turn found that the specified entity can move in. |
void |
removeGameListener(GameListener listener)
Removes the specified game listener. |
void |
removeMinefield(Minefield mf)
Removes the specified minefield |
void |
removePlayer(int id)
|
void |
removeTurnFor(Entity entity)
Removes the last, next turn found that the specified entity can move in. |
void |
removeVibrabomb(Minefield mf)
Removes the specified Vibrabomb |
void |
reset()
Resets this game by removing all entities. |
void |
resetActions()
Resets the actions list. |
void |
resetAttacks()
|
void |
resetCharges()
Resets the pending charges list. |
void |
resetControlRolls()
Resets the Control Roll list. |
void |
resetControlRolls(Entity entity)
Resets the Control Roll list for a given entity. |
void |
resetExtremeGravityPSRs()
Resets the extreme Gravity PSR list. |
void |
resetExtremeGravityPSRs(Entity entity)
Resets the extreme Gravity PSR list for a given entity. |
void |
resetMinefieldDensity(java.util.Vector<Minefield> newMinefields)
Resets the minefield density for a given Vector of minefields |
void |
resetPSRs()
Resets the PSR list. |
void |
resetPSRs(Entity entity)
Resets the PSR list for a given entity. |
void |
resetRams()
Resets the pending ram list. |
void |
resetTagInfo()
Reset tag information |
void |
resetTeleMissileAttacks()
Resets the pending telemissile attack list. |
void |
resetTurnIndex()
Resets the turn index to -1 (awaiting first turn) |
void |
rollInitAndResolveTies()
|
void |
setAllReports(java.util.Vector<java.util.Vector<Report>> v)
Used to populate previous game reports, e.g. after a client connects to an existing game. |
void |
setArtilleryVector(java.util.Vector<ArtilleryAttackAction> v)
|
void |
setAttacksVector(java.util.Vector<AttackHandler> v)
|
void |
setBoard(IBoard board)
Sets the new game board |
void |
setDeploymentComplete(boolean deploymentComplete)
|
void |
setEntitiesVector(java.util.Vector<Entity> entities)
|
void |
setEntity(int id,
Entity entity)
|
void |
setEntity(int id,
Entity entity,
java.util.Vector<UnitLocation> movePath)
|
void |
setExternalGameId(int value)
|
void |
setFlares(java.util.Vector<Flare> flares)
Set the list of flares |
void |
setForceVictory(boolean forceVictory)
Setter for property forceVictory. |
void |
setLastPhase(IGame.Phase lastPhase)
|
void |
setMinefields(java.util.Vector<Minefield> minefields)
Sets the minefields to the given Vector of the minefields |
void |
setOptions(GameOptions options)
sets the game options |
void |
setOutOfGameEntitiesVector(java.util.Vector<Entity> vOutOfGame)
Swap out the current list of dead (or fled) units for a new one. |
void |
setPhase(IGame.Phase phase)
|
void |
setPlanetaryConditions(PlanetaryConditions conditions)
|
void |
setPlayer(int id,
Player player)
|
void |
setRoundCount(int roundCount)
|
void |
setTurnIndex(int turnIndex)
Sets the current turn index |
void |
setTurnVector(java.util.Vector<GameTurn> turnVector)
Sets the current turn vector |
void |
setupRoundDeployment()
Sets up up the hashtable of who deploys when |
void |
setupTeams()
Set up the teams vector. |
void |
setVictoryContext(java.util.HashMap<java.lang.String,java.lang.Object> ctx)
set the game victory state. |
void |
setVictoryPlayerId(int victoryPlayerId)
Setter for property victoryPlayerId. |
void |
setVictoryTeam(int victoryTeam)
Setter for property victoryTeam. |
boolean |
shouldDeployForRound(int round)
|
boolean |
shouldDeployThisRound()
Check to see if we should deploy this round |
boolean |
useVectorMove()
|
| Method Detail |
|---|
int getExternalGameId()
void setExternalGameId(int value)
java.util.HashMap<java.lang.String,java.lang.Object> getVictoryContext()
void setVictoryContext(java.util.HashMap<java.lang.String,java.lang.Object> ctx)
void addGameListener(GameListener listener)
listener - the game listener.void removeGameListener(GameListener listener)
listener - the game listener.java.util.Vector<GameListener> getGameListeners()
void purgeGameListeners()
void processGameEvent(GameEvent event)
event - the game event.boolean containsMinefield(Coords coords)
coords - coords to check
true if there is a minefield at given coords or
false otherwisejava.util.Vector<Minefield> getMinefields(Coords coords)
coords -
Vector of minefields at specified coordint getNbrMinefields(Coords coords)
coords -
java.util.Enumeration<Coords> getMinedCoords()
Enumeration of the Coords
containing minefilds. This will not be null.void addMinefield(Minefield mf)
mf - minefield to addvoid addMinefields(java.util.Vector<Minefield> minefields)
minefields - the Vector of the minefields to addvoid setMinefields(java.util.Vector<Minefield> minefields)
Vector of the minefields
minefields - void resetMinefieldDensity(java.util.Vector<Minefield> newMinefields)
Vector of minefields
newMinefields - void removeMinefield(Minefield mf)
mf - minefield to removevoid clearMinefields()
java.util.Vector<Minefield> getVibrabombs()
Vector of the vibrabombsvoid addVibrabomb(Minefield mf)
mf - Vibrabomb to addvoid removeVibrabomb(Minefield mf)
mf - Vibrabomb to removeboolean containsVibrabomb(Minefield mf)
mf - the Vibrabomb to ceck
GameOptions getOptions()
void setOptions(GameOptions options)
options - IBoard getBoard()
void setBoard(IBoard board)
board - java.util.Enumeration<Team> getTeams()
int getNoOfTeams()
java.util.Vector<Team> getTeamsVector()
Team getTeamForPlayer(Player p)
void setupTeams()
java.util.Enumeration<Player> getPlayers()
java.util.Vector<Player> getPlayersVector()
int getNoOfPlayers()
Player getPlayer(int id)
void addPlayer(int id,
Player player)
void setPlayer(int id,
Player player)
void removePlayer(int id)
int getEntitiesOwnedBy(Player player)
int getAllEntitiesOwnedBy(Player player)
int getLiveEntitiesOwnedBy(Player player)
int getLiveDeployedEntitiesOwnedBy(Player player)
int getLiveCommandersOwnedBy(Player player)
boolean hasTacticalGenius(Player player)
java.util.Vector<Entity> getValidTargets(Entity entity)
boolean phaseHasTurns(IGame.Phase phase)
boolean isPhaseSimultaneous()
GameTurn getTurn()
GameTurn getTurnForPlayer(int pn)
GameTurn changeToNextTurn()
void resetTurnIndex()
boolean hasMoreTurns()
void insertNextTurn(GameTurn turn)
java.util.Enumeration<GameTurn> getTurns()
int getTurnIndex()
void setTurnIndex(int turnIndex)
java.util.Vector<GameTurn> getTurnVector()
void setTurnVector(java.util.Vector<GameTurn> turnVector)
IGame.Phase getPhase()
void setPhase(IGame.Phase phase)
IGame.Phase getLastPhase()
void setLastPhase(IGame.Phase lastPhase)
void setDeploymentComplete(boolean deploymentComplete)
boolean isDeploymentComplete()
void setupRoundDeployment()
void checkForCompleteDeployment()
boolean shouldDeployThisRound()
boolean shouldDeployForRound(int round)
void clearDeploymentThisRound()
java.util.Vector<Entity> getUndeployedEntities()
java.util.Enumeration<Entity> getEntities()
java.util.Vector<Entity> getEntitiesVector()
void setEntitiesVector(java.util.Vector<Entity> entities)
java.util.Vector<Entity> getOutOfGameEntitiesVector()
Entity getOutOfGameEntity(int id)
id - the int ID of the out-of-game entity.
Entity with that ID. If no
out-of-game entity has that ID, returns a null.void setOutOfGameEntitiesVector(java.util.Vector<Entity> vOutOfGame)
vOutOfGame - - the new Vector of dead or fled units.
This value should not be null.java.util.Vector<Entity> getC3NetworkMembers(Entity entity)
Vector containing the Entitys
that are in the same C3 network as the passed-in unit. The output will
contain the passed-in unit, if the unit has a C3 computer. If the unit
has no C3 computer, the output will be empty (but it will never be
null).
entity - - the Entity whose C3 network co- members is
required. This value may be null.
Vector that will contain all other
Entitys that are in the same C3 network as the
passed-in unit. This Vector may be empty, but it
will not be null.getC3SubNetworkMembers(Entity)java.util.Vector<Entity> getC3SubNetworkMembers(Entity entity)
Vector containing the Entitys
that are in the C3 sub-network under the passed-in unit. The output will
contain the passed-in unit, if the unit has a C3 computer. If the unit
has no C3 computer, the output will be empty (but it will never be
null). If the passed-in unit is a company commander or a
member of a C3i network, this call is the same as
getC3NetworkMembers.
entity - - the Entity whose C3 network sub- members
is required. This value may be null.
Vector that will contain all other
Entitys that are in the same C3 network under the
passed-in unit. This Vector may be empty, but it
will not be null.getC3NetworkMembers(Entity)java.util.Hashtable<Coords,java.util.Vector<Entity>> getPositionMap()
Hashtable that maps the Coords of
each unit in this Game to a Vector of
Entitys at that positions. Units that have no position
(e.g. loaded units) will not be in the map.
Hashtable that maps the Coords
positions or each unit in the game to a Vector of
Entitys at that position.java.util.Enumeration<Entity> getGraveyardEntities()
java.util.Enumeration<Entity> getWreckedEntities()
java.util.Enumeration<Entity> getRetreatedEntities()
java.util.Enumeration<Entity> getDevastatedEntities()
int getNoOfEntities()
Targetable getTarget(int nType,
int nID)
Entity getEntity(int id)
void addEntity(int id,
Entity entity)
void setEntity(int id,
Entity entity)
void setEntity(int id,
Entity entity,
java.util.Vector<UnitLocation> movePath)
int getNextEntityId()
boolean hasEntity(int entityId)
true if an entity with the specified id number
exists in this game.
void removeEntity(int id,
int condition)
void reset()
void addSmokeCloud(SmokeCloud cloud)
java.util.List<SmokeCloud> getSmokeCloudList()
Entity getFirstEntity(Coords c)
c - the coordinates to search at
Entity getFirstEnemyEntity(Coords c,
Entity currentEntity)
c - the coordinates to search atcurrentEntity - the entity that is firingjava.util.Enumeration<Entity> getEntities(Coords c)
java.util.Vector<Entity> getEntitiesVector(Coords c)
java.util.Vector<GunEmplacement> getGunEmplacements(Coords c)
Entity getAffaTarget(Coords c,
Entity ignore)
c - The Coords of the hex in which the accidental
fall from above happensignore - The entity who is falling, so shouldn't be returned
Entity that should be an AFFA target.
java.util.Enumeration<Entity> getEnemyEntities(Coords c,
Entity currentEntity)
Enumeration of the enemy's active entities at
the given coordinates.
c - the Coords of the hex being examined.currentEntity - the Entity whose enemies are needed.
Enumeration of Entitys at the
given coordinates who are enemies of the given unit.
java.util.Enumeration<Entity> getFriendlyEntities(Coords c,
Entity currentEntity)
Enumeration of friendly active entities at the
given coordinates.
c - the Coords of the hex being examined.currentEntity - the Entity whose friends are needed.
Enumeration of Entitys at the
given coordinates who are friends of the given unit.void moveToGraveyard(int id)
boolean isOutOfGame(int id)
Entity with the given ID is out of the game.
id - - the ID of the Entity to be checked.
true if the Entity is in the
graveyard, false otherwise.boolean isOutOfGame(Entity entity)
Entity is out of the game.
entity - - the Entity to be checked.
true if the Entity is in the
graveyard, false otherwise.Entity getFirstEntity()
Entity getFirstEntity(GameTurn turn)
int getFirstEntityNum()
int getFirstEntityNum(GameTurn turn)
Entity getNextEntity(int start)
start - the index number to start atint getNextEntityNum(int start)
start - the index number to start at
int getNextEntityNum(GameTurn turn,
int start)
turn - the turn to usestart - the entity id to start atint getFirstDeployableEntityNum()
int getFirstDeployableEntityNum(GameTurn turn)
int getNextDeployableEntityNum(int entityId)
int getNextDeployableEntityNum(GameTurn turn,
int start)
java.util.ArrayList<Entity> getPlayerEntities(Player player,
boolean hide)
player - - the Player whose entities are required.hide - - should fighters loaded into squadrons be excluded from this list?
Vector of Entitys.boolean isEntityStranded(Entity entity)
entity - the Entity that may be stranded
true if the entity is stranded false
otherwise.int getInfantryLeft(int playerId)
int getProtomechsLeft(int playerId)
int getVehiclesLeft(int playerId)
void removeTurnFor(Entity entity)
GameTurn removeFirstTurnFor(Entity entity)
boolean checkForMagneticClamp()
true if a unit was updated, false
if no player has a Battle Armor squad equipped with a Magnetic
Clamp.void addAction(EntityAction ea)
void addAttack(AttackHandler ah)
void removeAttack(AttackHandler ah)
java.util.Enumeration<AttackHandler> getAttacks()
java.util.Vector<AttackHandler> getAttacksVector()
void resetAttacks()
int getArtillerySize()
void setArtilleryVector(java.util.Vector<ArtilleryAttackAction> v)
java.util.Enumeration<ArtilleryAttackAction> getArtilleryAttacks()
void setAttacksVector(java.util.Vector<AttackHandler> v)
java.util.Enumeration<EntityAction> getActions()
void resetActions()
void removeActionsFor(int entityId)
void removeAction(java.lang.Object o)
o - The action to remove.int actionsSize()
java.util.Vector<EntityAction> getActionsVector()
void addInitiativeRerollRequest(Team t)
void rollInitAndResolveTies()
int getNoOfInitiativeRerollRequests()
void addCharge(AttackAction ea)
java.util.Enumeration<AttackAction> getCharges()
void resetCharges()
java.util.Vector<AttackAction> getChargesVector()
void addRam(AttackAction ea)
java.util.Enumeration<AttackAction> getRams()
void resetRams()
java.util.Vector<AttackAction> getRamsVector()
void addTeleMissileAttack(AttackAction ea)
java.util.Enumeration<AttackAction> getTeleMissileAttacks()
void resetTeleMissileAttacks()
java.util.Vector<AttackAction> getTeleMissileAttacksVector()
void addPSR(PilotingRollData psr)
java.util.Enumeration<PilotingRollData> getPSRs()
void addExtremeGravityPSR(PilotingRollData psr)
java.util.Enumeration<PilotingRollData> getExtremeGravityPSRs()
void resetPSRs(Entity entity)
void resetExtremeGravityPSRs()
void resetExtremeGravityPSRs(Entity entity)
void resetPSRs()
int getRoundCount()
void setRoundCount(int roundCount)
void incrementRoundCount()
boolean isForceVictory()
void setForceVictory(boolean forceVictory)
forceVictory - New value of property forceVictory.void addReports(java.util.Vector<Report> v)
v - Vector of reportsjava.util.Vector<Report> getReports(int r)
r - Round numberjava.util.Vector<java.util.Vector<Report>> getAllReports()
void setAllReports(java.util.Vector<java.util.Vector<Report>> v)
void clearAllReports()
void end(int winner,
int winnerTeam)
int getVictoryPlayerId()
void setVictoryPlayerId(int victoryPlayerId)
victoryPlayerId - New value of property victoryPlayerId.int getVictoryTeam()
void setVictoryTeam(int victoryTeam)
victoryTeam - New value of property victoryTeam.boolean isPlayerVictor(Player player)
boolean isPlayerVictor(int playerId)
java.util.Enumeration<Entity> getSelectedEntities(EntitySelector selector)
Entitys that pass the given selection criteria.
selector - the EntitySelector that implements test
that an entity must pass to be included. This value may be
null (in which case all entities in the game
will be returned).
Enumeration of all entities that the selector
accepts. This value will not be null but it may be
empty.int getSelectedEntityCount(EntitySelector selector)
Entitys that pass the given selection criteria.
selector - the EntitySelector that implements test
that an entity must pass to be included. This value may be
null (in which case the count of all entities
in the game will be returned).
int count of all entities that the selector
accepts. This value will not be null but it may be
empty.java.util.Enumeration<Entity> getSelectedOutOfGameEntities(EntitySelector selector)
Entitys that pass the given selection
criteria.
selector - the EntitySelector that implements test
that an entity must pass to be included. This value may be
null (in which case all entities in the game
will be returned).
Enumeration of all entities that the selector
accepts. This value will not be null but it may be
empty.int getSelectedOutOfGameEntityCount(EntitySelector selector)
Entitys that pass the given
selection criteria.
selector - the EntitySelector that implements test
that an entity must pass to be included. This value may be
null (in which case the count of all
out-of-game entities will be returned).
int count of all entities that the selector
accepts. This value will not be null but it may be
empty.boolean checkForValidNonInfantryAndOrProtomechs(int playerId)
java.util.Enumeration<Entity> getNemesisTargets(Entity attacker,
Coords target)
attacker - The attacking Entity.target - The Coords of the original target.
Enumeration of entities that have nemesis pods
attached and are located between attacker and target and are
friendly with the attacker.Entity getPreviousEntityFromList(Entity current)
current - The Entity whose list position you wish to
start from.
Entity in the list.Entity getNextEntityFromList(Entity current)
current - The Entity whose list position you wish to
start from.
Entity in the list.java.util.Vector<TagInfo> getTagInfo()
void addTagInfo(TagInfo info)
void clearTagInfoShots(Entity ae,
Coords tc)
void resetTagInfo()
java.util.Vector<Flare> getFlares()
void setFlares(java.util.Vector<Flare> flares)
void addFlare(Flare flare)
boolean isPositionIlluminated(Coords c)
java.util.Vector<Report> ageFlares()
boolean gameTimerIsExpired()
void createVictoryConditions()
Victory getVictory()
boolean useVectorMove()
void addControlRoll(PilotingRollData control)
java.util.Enumeration<PilotingRollData> getControlRolls()
void resetControlRolls(Entity entity)
void resetControlRolls()
boolean checkForValidSpaceStations(int playerId)
boolean checkForValidJumpships(int playerId)
boolean checkForValidWarships(int playerId)
boolean checkForValidDropships(int playerId)
boolean checkForValidSmallCraft(int playerId)
PlanetaryConditions getPlanetaryConditions()
void setPlanetaryConditions(PlanetaryConditions conditions)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||