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
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 net.sf.freecol.common.model.FreeColObject
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAttribute, getAttribute, getAttribute, getAttribute, getPropertyChangeListeners, getPropertyChangeListeners, hasAbility, hasAttribute, hasListeners, readAttributes, readChildren, readFromArrayElement, readFromArrayElement, readFromArrayElement, readFromListElement, readFromXMLElement, readFromXMLPartialImpl, removePropertyChangeListener, removePropertyChangeListener, setId, toArrayElement, toArrayElement, toListElement, toXML, toXML, toXML, toXMLElement, toXMLElement, toXMLElement, toXMLElement, toXMLElementPartial, toXMLPartialImpl, writeAttribute, writeAttributes, writeChildren, writeFreeColGameObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static final java.util.logging.Logger logger
Deprecated. 

MAX_DISTANCE_TO_BRING_GIFT

private static final int MAX_DISTANCE_TO_BRING_GIFT
Deprecated. 
See Also:
Constant Field Values

MAX_NUMBER_OF_GIFTS_BEING_DELIVERED

private static final int MAX_NUMBER_OF_GIFTS_BEING_DELIVERED
Deprecated. 
See Also:
Constant Field Values

MAX_DISTANCE_TO_MAKE_DEMANDS

private static final int MAX_DISTANCE_TO_MAKE_DEMANDS
Deprecated. 
See Also:
Constant Field Values

MAX_NUMBER_OF_DEMANDS

private static final int MAX_NUMBER_OF_DEMANDS
Deprecated. 
See Also:
Constant Field Values
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

giveNormalMissions

private void giveNormalMissions()
Deprecated. 
Gives a mission to non-naval units.


secureSettlements

private void secureSettlements()
Deprecated. 
Takes the necessary actions to secure the settlements. This is done by making new military units or to give existing units new missions.


secureIndianSettlement

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


bringGifts

private void bringGifts()
Deprecated. 
Brings gifts to nice players with nearby colonies.


demandTribute

private void demandTribute()
Deprecated. 
Demands goods from players with nearby colonies.


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.