|
|||||||||
| 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.IndianAIPlayer
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 IndianAIPlayer
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. |
private static int |
MAX_DISTANCE_TO_BRING_GIFT
Deprecated. |
private static int |
MAX_DISTANCE_TO_MAKE_DEMANDS
Deprecated. |
private static int |
MAX_NUMBER_OF_DEMANDS
Deprecated. |
private static int |
MAX_NUMBER_OF_GIFTS_BEING_DELIVERED
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 | |
|---|---|
IndianAIPlayer()
Deprecated. |
|
| Method Summary | |
|---|---|
private void |
bringGifts()
Deprecated. Brings gifts to nice players with nearby colonies. |
private void |
demandTribute()
Deprecated. Demands goods from players with nearby colonies. |
private void |
giveNormalMissions()
Deprecated. Gives a mission to non-naval units. |
void |
secureIndianSettlement(IndianSettlement is)
Deprecated. Takes the necessary actions to secure an indian settlement |
private void |
secureSettlements()
Deprecated. Takes the necessary actions to secure the settlements. |
void |
startWorking()
Deprecated. Tells this AIPlayer to make decisions. |
int |
tradeProposition(Unit unit,
Settlement settlement,
Goods goods,
int gold)
Deprecated. Called when another Player proposes a trade. |
| 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
private static final int MAX_DISTANCE_TO_BRING_GIFT
private static final int MAX_NUMBER_OF_GIFTS_BEING_DELIVERED
private static final int MAX_DISTANCE_TO_MAKE_DEMANDS
private static final int MAX_NUMBER_OF_DEMANDS
| Constructor Detail |
|---|
public IndianAIPlayer()
| 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 void secureSettlements()
public void secureIndianSettlement(IndianSettlement is)
private void bringGifts()
private void demandTribute()
public int tradeProposition(Unit unit,
Settlement settlement,
Goods goods,
int gold)
Player proposes a trade.
unit - The foreign Unit trying to trade.settlement - The Settlement this player owns and
which the given Unit if trying to sell goods.goods - The goods the given Unit is trying to sell.gold - The suggested price.
AIPlayer suggests or
NetworkConstants.NO_TRADE.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||