|
||||||||||
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 |
---|
Fields inherited from class net.sf.freecol.common.model.FreeColObject |
---|
ID_ATTRIBUTE_TAG |
Constructor Summary | |
---|---|
IndianAIPlayer()
Deprecated. |
Method Summary | |
---|---|
void |
secureIndianSettlement(IndianSettlement is)
Deprecated. Takes the necessary actions to secure an indian settlement |
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 |
---|
buyProposition, getAIUnitIterator, getBestTreasureTrain, getConnection, getId, getPlayer, getXMLElementTagName, registerSellGoods, setDebuggingConnection |
Methods inherited from class net.sf.freecol.server.ai.AIObject |
---|
dispose, getAIMain, getGame, isUninitialized, readFromXML |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 NewAIPlayer
public void secureIndianSettlement(IndianSettlement is)
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 |