Package net.sf.colossus.ai
Class AbstractAI.AbstractAIOracle
- java.lang.Object
-
- net.sf.colossus.ai.AbstractAI.AbstractAIOracle
-
- All Implemented Interfaces:
IHintOracle
- Enclosing class:
- AbstractAI
protected class AbstractAI.AbstractAIOracle extends java.lang.Object implements IHintOracle
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<MasterHex,java.util.List<Legion>>[]enemyAttackMapprivate MasterHexhexprivate LegionClientSidelegionprivate java.util.List<CreatureType>recruits
-
Constructor Summary
Constructors Constructor Description AbstractAIOracle(LegionClientSide legion, MasterHex hex, java.util.List<CreatureType> recruits)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intbiggestAttackerHeight()The height of the tallest legion that can attack the legion we consider.booleancanReach(java.lang.String terrainTypeName)A terrain can be reached by the legion with one move.booleancanRecruit(java.lang.String name)A creature with the given name could be recruited.intcreatureAvailable(java.lang.String name)The number of currently available creatures of the given type.intcreatureAvailable(CreatureType creatureType)java.lang.StringhexLabel()The label of the master board hex under consideration.
-
-
-
Field Detail
-
legion
private final LegionClientSide legion
-
hex
private final MasterHex hex
-
recruits
private final java.util.List<CreatureType> recruits
-
-
Constructor Detail
-
AbstractAIOracle
AbstractAIOracle(LegionClientSide legion, MasterHex hex, java.util.List<CreatureType> recruits)
-
-
Method Detail
-
canReach
public boolean canReach(java.lang.String terrainTypeName)
Description copied from interface:IHintOracleA terrain can be reached by the legion with one move.- Specified by:
canReachin interfaceIHintOracle
-
creatureAvailable
public int creatureAvailable(java.lang.String name)
Description copied from interface:IHintOracleThe number of currently available creatures of the given type.- Specified by:
creatureAvailablein interfaceIHintOracle
-
creatureAvailable
public int creatureAvailable(CreatureType creatureType)
- Specified by:
creatureAvailablein interfaceIHintOracle
-
canRecruit
public boolean canRecruit(java.lang.String name)
Description copied from interface:IHintOracleA creature with the given name could be recruited.- Specified by:
canRecruitin interfaceIHintOracle
-
hexLabel
public java.lang.String hexLabel()
Description copied from interface:IHintOracleThe label of the master board hex under consideration.- Specified by:
hexLabelin interfaceIHintOracle
-
biggestAttackerHeight
public int biggestAttackerHeight()
Description copied from interface:IHintOracleThe height of the tallest legion that can attack the legion we consider. 0 if none can attack.- Specified by:
biggestAttackerHeightin interfaceIHintOracle
-
-