|
|||||||||
| 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.weakAI.WeakAI
public class WeakAI
| Field Summary | |
|---|---|
static Match<Unit> |
HasntMoved
|
static Match<Unit> |
Transporting
|
| Constructor Summary | |
|---|---|
WeakAI(java.lang.String name)
Creates new TripleAPlayer |
|
| Method Summary | |
|---|---|
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. |
static Match<Territory> |
passableChannel(GameData data,
PlayerID player)
|
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. |
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 |
|---|
battle, battleInfoMessage, confirmEnemyCasualties, confirmMoveHariKari, confirmMoveKamikaze, confirmOwnCasualties, getGameData, getID, getName, getPlayerBridge, getRemotePlayerType, getWhoAmI, initialize, pause, reportError, reportMessage, retreatNotificationMessage, selectAttackSubs, selectAttackTransports, selectAttackUnits, selectBombardingTerritory, 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, selectAttackSubs, selectAttackTransports, selectAttackUnits, selectBombardingTerritory, selectShoreBombard, whereShouldRocketsAttack |
| Field Detail |
|---|
public static final Match<Unit> HasntMoved
public static final Match<Unit> Transporting
| Constructor Detail |
|---|
public WeakAI(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 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 ITripleaPlayer
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 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
public static final Match<Territory> passableChannel(GameData data,
PlayerID player)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||