net.sf.freecol.server.ai
Class IndianAIPlayer

java.lang.Object
  extended by net.sf.freecol.common.model.FreeColObject
      extended by net.sf.freecol.server.ai.AIObject
          extended by net.sf.freecol.server.ai.NewAIPlayer
              extended by net.sf.freecol.server.ai.IndianAIPlayer

Deprecated. Currently unused, outdated copy of 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
extends NewAIPlayer

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 net.sf.freecol.common.model.FreeColObject
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAttribute, getAttribute, getAttribute, getAttribute, getPropertyChangeListeners, getPropertyChangeListeners, hasAbility, hasAttribute, hasListeners, readFromXMLElement, removePropertyChangeListener, removePropertyChangeListener, toXML, toXML, toXML, toXMLElement, toXMLElement, toXMLElement, toXMLElement, toXMLElementPartial, writeAttribute, writeFreeColGameObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndianAIPlayer

public IndianAIPlayer()
Deprecated. 
Method Detail

startWorking

public void startWorking()
Deprecated. 
Tells this AIPlayer to make decisions. The AIPlayer is done doing work this turn when this method returns.

Specified by:
startWorking in class NewAIPlayer

secureIndianSettlement

public void secureIndianSettlement(IndianSettlement is)
Deprecated. 
Takes the necessary actions to secure an indian settlement


tradeProposition

public int tradeProposition(Unit unit,
                            Settlement settlement,
                            Goods goods,
                            int gold)
Deprecated. 
Called when another Player proposes a trade.

Parameters:
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.
Returns:
The price this AIPlayer suggests or NetworkConstants.NO_TRADE.