Package net.sf.colossus.ai
Class AbstractHintProvider
- java.lang.Object
-
- net.sf.colossus.ai.AbstractHintProvider
-
- All Implemented Interfaces:
IVariantHint
public abstract class AbstractHintProvider extends java.lang.Object implements IVariantHint
Abstract base class for variant-specific recruitment hinting. TODO: add implementations for the other IVariantHint methods, so this class could be the default behaviour for new variants (thus getting rid of the requirement that each variant has to compile Java code).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.sf.colossus.variant.IVariantHint
IVariantHint.AIStyle
-
-
Constructor Summary
Constructors Constructor Description AbstractHintProvider(Variant variant)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.List<java.lang.String>
creaturesToStrings(java.util.List<CreatureType> creatures)
protected CreatureType
getCreatureType(java.lang.String creatureName)
int
getHintedRecruitmentValueOffset(CreatureType creature, java.util.List<IVariantHint.AIStyle> styles)
No creature gets an offset by default, subclasses can override.protected MasterHex
getMasterHex(java.lang.String hexLabel)
protected MasterBoardTerrain
getTerrain(java.lang.String id)
protected Variant
getVariant()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.colossus.variant.IVariantHint
getInitialSplitHint, getRecruitHint
-
-
-
-
Field Detail
-
variant
private final Variant variant
-
-
Constructor Detail
-
AbstractHintProvider
public AbstractHintProvider(Variant variant)
-
-
Method Detail
-
getHintedRecruitmentValueOffset
public int getHintedRecruitmentValueOffset(CreatureType creature, java.util.List<IVariantHint.AIStyle> styles)
No creature gets an offset by default, subclasses can override.- Specified by:
getHintedRecruitmentValueOffset
in interfaceIVariantHint
- Parameters:
creature
- Type of the creaturestyles
- List of AI styles to hint for- Returns:
- An offset to the Point Value of the creature.
-
getVariant
protected Variant getVariant()
-
getCreatureType
protected CreatureType getCreatureType(java.lang.String creatureName)
-
getMasterHex
protected MasterHex getMasterHex(java.lang.String hexLabel)
-
getTerrain
protected MasterBoardTerrain getTerrain(java.lang.String id)
-
creaturesToStrings
public static java.util.List<java.lang.String> creaturesToStrings(java.util.List<CreatureType> creatures)
-
-