game.interfaces
Interface AI

All Known Implementing Classes:
AbstractAI

public interface AI

Interface to the AI. This will be implemented differently for player and non-player civilizations.


Method Summary
 void activatedTechnology(java.lang.String technology)
          Notify the AI that a technology has been activated.
 void carryOutOrders()
          Carry out orders.
 void completeTurn()
          Perform any tidy up work at end of turn.
 Civilization getCivilization()
          Return the civilization.
 boolean isBuilt(java.lang.String value)
          Return true if the named buildable object has been built.
 void issueOrders()
          Issue orders.
 void newTechnologyLevel(java.lang.String technology, float level)
          Notify the AI that a technology has gained another level.
 void notifyBuilding(Buildable buildable, java.lang.Object object, Square square, boolean success)
          Notify the AI that building has taken place.
 void studyCombatReport(CombatReport report)
          Study combat report.
 

Method Detail

completeTurn

public void completeTurn()
Perform any tidy up work at end of turn. Called in NextTurn.


issueOrders

public void issueOrders()
Issue orders.


carryOutOrders

public void carryOutOrders()
Carry out orders.


newTechnologyLevel

public void newTechnologyLevel(java.lang.String technology,
                               float level)
Notify the AI that a technology has gained another level.

Parameters:
technology - the name of the technology that has gained a level.
level - the new level.

activatedTechnology

public void activatedTechnology(java.lang.String technology)
Notify the AI that a technology has been activated.

Parameters:
technology - the name of the technology that is activated.

notifyBuilding

public void notifyBuilding(Buildable buildable,
                           java.lang.Object object,
                           Square square,
                           boolean success)
Notify the AI that building has taken place.

Parameters:
buildable - the buildable class.
object - the actual object that has been built.
square - the place where built.

isBuilt

public boolean isBuilt(java.lang.String value)
Return true if the named buildable object has been built.

Returns:
true if the named buildable object has been built.

getCivilization

public Civilization getCivilization()
Return the civilization.

Returns:
the civilization.

studyCombatReport

public void studyCombatReport(CombatReport report)
Study combat report.

Parameters:
report - the combat report to study.