|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgames.strategy.common.player.AbstractBasePlayer
games.strategy.common.player.AbstractHumanPlayer<TripleAFrame>
games.strategy.triplea.TripleAPlayer
public class TripleAPlayer
| Field Summary |
|---|
| Fields inherited from class games.strategy.common.player.AbstractHumanPlayer |
|---|
m_ui |
| Fields inherited from class games.strategy.common.player.AbstractBasePlayer |
|---|
m_bridge, m_id, m_name |
| Constructor Summary | |
|---|---|
TripleAPlayer(java.lang.String name)
Creates new TripleAPlayer |
|
| Method Summary | |
|---|---|
void |
confirmEnemyCasualties(GUID battleId,
java.lang.String message,
PlayerID hitPlayer)
Allows the user to pause and confirm enemy casualties |
boolean |
confirmMoveHariKari()
The attempted move will kill some units |
boolean |
confirmMoveInFaceOfAA(java.util.Collection<Territory> aaFiringTerritories)
The attempted move will incur aa fire, confirm that you still want to move |
boolean |
confirmMoveKamikaze()
The attempted move will kill some air units |
void |
confirmOwnCasualties(GUID battleId,
java.lang.String message)
|
java.util.Collection<Unit> |
getNumberOfFightersToMoveToNewCarrier(java.util.Collection<Unit> fightersThatCanBeMoved,
Territory from)
get the fighters to move to a newly produced carrier |
boolean |
isSBRAffectsUnitProduction(GameData data)
|
void |
reportError(java.lang.String error)
Report an error to the user. |
void |
reportMessage(java.lang.String message)
report a message to the user |
Territory |
retreatQuery(GUID battleID,
boolean submerge,
java.util.Collection<Territory> possibleTerritories,
java.lang.String message)
Ask the player if he wishes to retreat. |
boolean |
selectAttackSubs(Territory unitTerritory)
Ask if the player wants to attack lone subs |
boolean |
selectAttackTransports(Territory unitTerritory)
Ask if the player wants to attack lone transports |
boolean |
selectAttackUnits(Territory unitTerritory)
Ask if the player wants to attack units |
Territory |
selectBombardingTerritory(Unit unit,
Territory unitTerritory,
java.util.Collection<Territory> territories,
boolean noneAvailable)
Select the territory to bombard with the bombarding capable unit (eg battleship) |
CasualtyDetails |
selectCasualties(java.util.Collection<Unit> selectFrom,
java.util.Map<Unit,java.util.Collection<Unit>> dependents,
int count,
java.lang.String message,
DiceRoll dice,
PlayerID hit,
java.util.List<Unit> defaultCasualties,
GUID battleID)
Select casualties |
int[] |
selectFixedDice(int numDice,
int hitAt,
boolean hitOnlyIfEquals,
java.lang.String title)
Select a fixed dice roll |
boolean |
selectShoreBombard(Territory unitTerritory)
Ask if the player wants to shore bombard |
Territory |
selectTerritoryForAirToLand(java.util.Collection<Territory> candidates)
Some carriers were lost while defending. |
boolean |
shouldBomberBomb(Territory territory)
One or more bombers have just moved into a territory where a strategic bombing raid can be conducted, should the bomber bomb? |
void |
start(java.lang.String name)
The given phase has started. |
Territory |
whereShouldRocketsAttack(java.util.Collection<Territory> candidates,
Territory from)
Choose where my rockets should fire |
| Methods inherited from class games.strategy.common.player.AbstractHumanPlayer |
|---|
setFrame |
| Methods inherited from class games.strategy.common.player.AbstractBasePlayer |
|---|
getGameData, getID, getName, getPlayerBridge, initialize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface games.strategy.engine.gamePlayer.IGamePlayer |
|---|
getID, getName, initialize |
| Methods inherited from interface games.strategy.triplea.player.ITripleaPlayer |
|---|
getID |
| Constructor Detail |
|---|
public TripleAPlayer(java.lang.String name)
| Method Detail |
|---|
public void reportError(java.lang.String error)
ITripleaPlayer
reportError in interface ITripleaPlayerpublic void reportMessage(java.lang.String message)
ITripleaPlayer
reportMessage in interface ITripleaPlayerpublic void start(java.lang.String name)
AbstractBasePlayer
start in interface IGamePlayerstart in class AbstractHumanPlayer<TripleAFrame>
public CasualtyDetails selectCasualties(java.util.Collection<Unit> selectFrom,
java.util.Map<Unit,java.util.Collection<Unit>> dependents,
int count,
java.lang.String message,
DiceRoll dice,
PlayerID hit,
java.util.List<Unit> defaultCasualties,
GUID battleID)
ITripleaPlayer
selectCasualties in interface ITripleaPlayerselectFrom - - the units to select casualties fromdependents - - dependents of the units to select fromcount - - the number of casualties to selectmessage - - ui message to displaydice - - the dice rolled for the casualtieshit - - the player hitdefaultCasualties - - default casualties as selected by the gamebattleID - - the battle we are fighting in, may be null if this is an aa casualty selection during a move
public int[] selectFixedDice(int numDice,
int hitAt,
boolean hitOnlyIfEquals,
java.lang.String title)
ITripleaPlayer
selectFixedDice in interface ITripleaPlayernumDice - - the number of dice rollshitAt - - the lowest roll that constitutes a hit (0 for none)hitOnlyIfEquals - - whether to count rolls greater than hitAt as hitstitle - - the title for the DiceChooser
public Territory selectBombardingTerritory(Unit unit,
Territory unitTerritory,
java.util.Collection<Territory> territories,
boolean noneAvailable)
ITripleaPlayer
selectBombardingTerritory in interface ITripleaPlayerunit - - the bombarding unitunitTerritory - - where the bombarding unit isterritories - - territories where the unit can bombard
public boolean selectAttackSubs(Territory unitTerritory)
ITripleaPlayer
selectAttackSubs in interface ITripleaPlayerunitTerritory - - where the potential battle ispublic boolean selectAttackTransports(Territory unitTerritory)
ITripleaPlayer
selectAttackTransports in interface ITripleaPlayerunitTerritory - - where the potential battle ispublic boolean selectAttackUnits(Territory unitTerritory)
ITripleaPlayer
selectAttackUnits in interface ITripleaPlayerunitTerritory - - where the potential battle ispublic boolean selectShoreBombard(Territory unitTerritory)
ITripleaPlayer
selectShoreBombard in interface ITripleaPlayerunitTerritory - - where the potential battle ispublic boolean shouldBomberBomb(Territory territory)
ITripleaPlayer
shouldBomberBomb in interface ITripleaPlayer
public Territory whereShouldRocketsAttack(java.util.Collection<Territory> candidates,
Territory from)
ITripleaPlayer
whereShouldRocketsAttack in interface ITripleaPlayercandidates - - a collection of Territories, the possible territories to attackfrom - - where the rockets are launched from, null for WW2V1 rules
public java.util.Collection<Unit> getNumberOfFightersToMoveToNewCarrier(java.util.Collection<Unit> fightersThatCanBeMoved,
Territory from)
ITripleaPlayer
getNumberOfFightersToMoveToNewCarrier in interface ITripleaPlayerfightersThatCanBeMoved - - the fighters that can be movedfrom - - the territory containing the factory
public Territory selectTerritoryForAirToLand(java.util.Collection<Territory> candidates)
ITripleaPlayer
selectTerritoryForAirToLand in interface ITripleaPlayercandidates - - a list of territories - these are the places where air units can land
public boolean confirmMoveInFaceOfAA(java.util.Collection<Territory> aaFiringTerritories)
ITripleaPlayer
confirmMoveInFaceOfAA in interface ITripleaPlayeraaFiringTerritories - - the territories where aa will firepublic boolean confirmMoveKamikaze()
ITripleaPlayer
confirmMoveKamikaze in interface ITripleaPlayerpublic boolean confirmMoveHariKari()
ITripleaPlayer
confirmMoveHariKari in interface ITripleaPlayer
public Territory retreatQuery(GUID battleID,
boolean submerge,
java.util.Collection<Territory> possibleTerritories,
java.lang.String message)
ITripleaPlayer
retreatQuery in interface ITripleaPlayerbattleID - - the battlesubmerge - - is submerging possiblepossibleTerritories - - where the player can retreat tomessage - - user displayable message
public void confirmEnemyCasualties(GUID battleId,
java.lang.String message,
PlayerID hitPlayer)
ITripleaPlayer
confirmEnemyCasualties in interface ITripleaPlayer
public void confirmOwnCasualties(GUID battleId,
java.lang.String message)
confirmOwnCasualties in interface ITripleaPlayerpublic final boolean isSBRAffectsUnitProduction(GameData data)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||