|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.freecol.common.model.FreeColObject
net.sf.freecol.server.ai.AIObject
net.sf.freecol.server.ai.NewAIPlayer
net.sf.freecol.server.ai.EuropeanAIPlayer
net.sf.freecol.server.ai.REFAIPlayer
AIPlayer. Eventual
specialization of AI should extend AIPlayer, see ColonialAIPlayer.
The method startWorking() gets called by the
AIInGameInputHandler when it is this player's turn.
public class REFAIPlayer
Objects of this class contains AI-information for a single Player and
is used for controlling this getPlayer().
| Field Summary | |
|---|---|
private static java.util.logging.Logger |
logger
Deprecated. |
| Fields inherited from class net.sf.freecol.server.ai.NewAIPlayer |
|---|
horses, muskets, sessionRegister, toolsType |
| Fields inherited from class net.sf.freecol.server.ai.AIObject |
|---|
uninitialized |
| Fields inherited from class net.sf.freecol.common.model.FreeColObject |
|---|
ARRAY_SIZE, ID_ATTRIBUTE, ID_ATTRIBUTE_TAG, PARTIAL_ATTRIBUTE |
| Constructor Summary | |
|---|---|
REFAIPlayer()
Deprecated. |
|
| Method Summary | |
|---|---|
boolean |
acceptIndianDemand(Unit unit,
Colony colony,
Goods goods,
int gold)
Deprecated. Decides whether to accept an Indian demand, or not. |
private void |
checkForREFDefeat()
Deprecated. For REF-players: Checks if we have lost the war of independence. |
private java.util.List<Player> |
getDominionsAtWar()
Deprecated. Gets a list of the players this REF player is currently fighting. |
private int |
getNumberOfKingUnits()
Deprecated. Gets the number of King's units. |
private void |
giveNormalMissions()
Deprecated. Gives a mission to non-naval units. |
private boolean |
isWorkForREF()
Deprecated. Checks if this player has work to do (provided it is an REF-player). |
void |
startWorking()
Deprecated. Tells this AIPlayer to make decisions. |
| Methods inherited from class net.sf.freecol.server.ai.EuropeanAIPlayer |
|---|
createAIGoodsInColonies, createTransportLists, ensureCorrectMissions, getAIColonyIterator, getDefendColonyMissionValue, getTileImprovementPlanIterator, getWishIterator, giveMilitaryMission, giveNavalMissions, hasFewColonies, hasManOfWar, rearrangeWorkersInColonies, recruitAIUnitInEurope, secureColony, secureSettlements, tradeProposition, trainAIUnitInEurope |
| Methods inherited from class net.sf.freecol.server.ai.NewAIPlayer |
|---|
abortInvalidAndOneTimeMissions, abortInvalidMissions, buyProposition, clearAIUnits, determineStances, doMissions, getAIUnitIterator, getBestTreasureTrain, getConnection, getId, getPlayer, getUnitSeekAndDestroyMissionValue, getXMLElementTagName, isTargetValidForSeekAndDestroy, readFromXMLImpl, registerSellGoods, sendAndWaitSafely, sendUpdatedTilesToAll, setDebuggingConnection, toXMLImpl |
| Methods inherited from class net.sf.freecol.server.ai.AIObject |
|---|
dispose, getAIMain, getAIRandom, getGame, isUninitialized, readFromXML |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.util.logging.Logger logger
| Constructor Detail |
|---|
public REFAIPlayer()
| Method Detail |
|---|
public void startWorking()
AIPlayer to make decisions. The
AIPlayer is done doing work this turn when this method
returns.
startWorking in class NewAIPlayerprivate void giveNormalMissions()
private java.util.List<Player> getDominionsAtWar()
private int getNumberOfKingUnits()
private void checkForREFDefeat()
private boolean isWorkForREF()
true if any of our units are located in the new
world or if a puppet-nation has declared independence.
public boolean acceptIndianDemand(Unit unit,
Colony colony,
Goods goods,
int gold)
acceptIndianDemand in class EuropeanAIPlayerunit - The unit making demands.colony - The colony where demands are being made.goods - The goods demanded.gold - The amount of gold demanded.
true if this AIPlayer accepts the
indian demand and false otherwise.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||