net.sf.colossus.ai
Class AbstractAI.AbstractAIOracle

java.lang.Object
  extended by 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
private  java.util.Map<MasterHex,java.util.List<Legion>>[] enemyAttackMap
           
private  MasterHex hex
           
private  LegionClientSide legion
           
private  java.util.List<CreatureType> recruits
           
 
Constructor Summary
AbstractAI.AbstractAIOracle(LegionClientSide legion, MasterHex hex, java.util.List<CreatureType> recruits)
           
 
Method Summary
 int biggestAttackerHeight()
          The height of the tallest legion that can attack the legion we consider.
 boolean canReach(java.lang.String terrainTypeName)
          A terrain can be reached by the legion with one move.
 boolean canRecruit(java.lang.String name)
          A creature with the given name could be recruited.
 int creatureAvailable(CreatureType creatureType)
           
 int creatureAvailable(java.lang.String name)
          The number of currently available creatures of the given type.
 java.lang.String hexLabel()
          The label of the master board hex under consideration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

legion

private final LegionClientSide legion

hex

private final MasterHex hex

recruits

private final java.util.List<CreatureType> recruits

enemyAttackMap

private java.util.Map<MasterHex,java.util.List<Legion>>[] enemyAttackMap
Constructor Detail

AbstractAI.AbstractAIOracle

AbstractAI.AbstractAIOracle(LegionClientSide legion,
                            MasterHex hex,
                            java.util.List<CreatureType> recruits)
Method Detail

canReach

public boolean canReach(java.lang.String terrainTypeName)
Description copied from interface: IHintOracle
A terrain can be reached by the legion with one move.

Specified by:
canReach in interface IHintOracle

creatureAvailable

public int creatureAvailable(java.lang.String name)
Description copied from interface: IHintOracle
The number of currently available creatures of the given type.

Specified by:
creatureAvailable in interface IHintOracle

creatureAvailable

public int creatureAvailable(CreatureType creatureType)
Specified by:
creatureAvailable in interface IHintOracle

canRecruit

public boolean canRecruit(java.lang.String name)
Description copied from interface: IHintOracle
A creature with the given name could be recruited.

Specified by:
canRecruit in interface IHintOracle

hexLabel

public java.lang.String hexLabel()
Description copied from interface: IHintOracle
The label of the master board hex under consideration.

Specified by:
hexLabel in interface IHintOracle

biggestAttackerHeight

public int biggestAttackerHeight()
Description copied from interface: IHintOracle
The height of the tallest legion that can attack the legion we consider. 0 if none can attack.

Specified by:
biggestAttackerHeight in interface IHintOracle