|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgames.strategy.triplea.baseAI.AbstractAI
games.strategy.triplea.strongAI.StrongAI
public class StrongAI
| Field Summary | |
|---|---|
static Match<Unit> |
HasntMoved
|
static Match<Unit> |
Transporting
|
| Constructor Summary | |
|---|---|
StrongAI(java.lang.String name)
Creates new TripleAPlayer |
|
| Method Summary | |
|---|---|
protected void |
battle(IBattleDelegate battleDelegate,
GameData data,
PlayerID player)
It is the AI's turn to fight. |
boolean |
confirmMoveInFaceOfAA(java.util.Collection aaFiringTerritories)
The attempted move will incur aa fire, confirm that you still want to move |
java.util.Collection<Unit> |
getNumberOfFightersToMoveToNewCarrier(java.util.Collection<Unit> fightersThatCanBeMoved,
Territory from)
get the fighters to move to a newly produced carrier |
protected void |
move(boolean nonCombat,
IMoveDelegate moveDel,
GameData data,
PlayerID player)
It is the AI's turn to move. |
protected void |
place(boolean bid,
IAbstractPlaceDelegate placeDelegate,
GameData data,
PlayerID player)
It is the AI's turn to place units. |
protected void |
purchase(boolean purcahseForBid,
int PUsToSpend,
IPurchaseDelegate purchaseDelegate,
GameData data,
PlayerID player)
It is the AI's turn to purchase units. |
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 territory)
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 numRolls,
int hitAt,
boolean hitOnlyIfEquals,
java.lang.String message)
Select a fixed dice roll |
Territory |
selectTerritoryForAirToLand(java.util.Collection 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? |
protected void |
tech(ITechDelegate techDelegate,
GameData data,
PlayerID player)
It is the AI's turn to roll for technology. |
| Methods inherited from class games.strategy.triplea.baseAI.AbstractAI |
|---|
battleInfoMessage, confirmEnemyCasualties, confirmMoveHariKari, confirmMoveKamikaze, confirmOwnCasualties, getGameData, getID, getName, getPlayerBridge, getRemotePlayerType, getWhoAmI, initialize, pause, reportError, reportMessage, retreatNotificationMessage, selectShoreBombard, start, whereShouldRocketsAttack |
| 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, start |
| Methods inherited from interface games.strategy.triplea.player.ITripleaPlayer |
|---|
confirmEnemyCasualties, confirmMoveHariKari, confirmMoveKamikaze, confirmOwnCasualties, getID, reportError, reportMessage, selectShoreBombard, whereShouldRocketsAttack |
| Field Detail |
|---|
public static final Match<Unit> HasntMoved
public static final Match<Unit> Transporting
| Constructor Detail |
|---|
public StrongAI(java.lang.String name)
| Method Detail |
|---|
protected void tech(ITechDelegate techDelegate,
GameData data,
PlayerID player)
AbstractAI
tech in class AbstractAItechDelegate - - the tech delegate to roll fordata - - the game dataplayer - - the player to roll tech for
protected void move(boolean nonCombat,
IMoveDelegate moveDel,
GameData data,
PlayerID player)
AbstractAI
move in class AbstractAInonCombat - - are we moving in combat, or non combatmoveDel - - the move delegate to make moves withdata - - the current game dataplayer - - the player to move with
protected void battle(IBattleDelegate battleDelegate,
GameData data,
PlayerID player)
AbstractAI
battle in class AbstractAIbattleDelegate - the battle delegate to query for battles not fought and thedata - - the current GameDataplayer - - the player to fight for
protected void purchase(boolean purcahseForBid,
int PUsToSpend,
IPurchaseDelegate purchaseDelegate,
GameData data,
PlayerID player)
AbstractAI
purchase in class AbstractAIpurcahseForBid - - is this a bid purchase, or a normal purchasePUsToSpend - - how many PUs we have to spendpurchaseDelegate - - the purchase delgate to buy things withdata - - the GameDataplayer - - the player to buy for
protected void place(boolean bid,
IAbstractPlaceDelegate placeDelegate,
GameData data,
PlayerID player)
AbstractAI
place in class AbstractAIbid - - is this a placement for bidplaceDelegate - - the place delegate to place withdata - - the current Game Dataplayer - - the player to place for
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 boolean shouldBomberBomb(Territory territory)
ITripleaPlayer
shouldBomberBomb in interface ITripleaPlayerpublic boolean selectAttackSubs(Territory unitTerritory)
ITripleaPlayer
selectAttackSubs in interface ITripleaPlayerselectAttackSubs in class AbstractAIunitTerritory - - where the potential battle ispublic boolean selectAttackUnits(Territory unitTerritory)
ITripleaPlayer
selectAttackUnits in interface ITripleaPlayerselectAttackUnits in class AbstractAIunitTerritory - - where the potential battle ispublic boolean selectAttackTransports(Territory territory)
ITripleaPlayer
selectAttackTransports in interface ITripleaPlayerselectAttackTransports in class AbstractAIterritory - - where the potential battle is
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 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 aaFiringTerritories)
ITripleaPlayer
confirmMoveInFaceOfAA in interface ITripleaPlayeraaFiringTerritories - - the territories where aa will fire
public Territory selectBombardingTerritory(Unit unit,
Territory unitTerritory,
java.util.Collection<Territory> territories,
boolean noneAvailable)
selectBombardingTerritory in interface ITripleaPlayerselectBombardingTerritory in class AbstractAIunit - - the bombarding unitunitTerritory - - where the bombarding unit isterritories - - territories where the unit can bombardnoneAvailable -
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 int[] selectFixedDice(int numRolls,
int hitAt,
boolean hitOnlyIfEquals,
java.lang.String message)
ITripleaPlayer
selectFixedDice in interface ITripleaPlayernumRolls - - the number of dice rollshitAt - - the lowest roll that constitutes a hit (0 for none)hitOnlyIfEquals - - whether to count rolls greater than hitAt as hitsmessage - - the title for the DiceChooser
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||