Class AbstractTacticalObjective
java.lang.Object
net.sf.colossus.ai.objectives.AbstractTacticalObjective
- All Implemented Interfaces:
TacticalObjective
- Direct Known Subclasses:
CreatureAttackTacticalObjective, DestroyCreatureTacticalObjective, PreserveCreatureTacticalObjective
Abstract implementation of @TacticalObjective, handling the priority
stuff to avoid duplication.
- Author:
- Romain Dolbeau
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatchangePriority(float newPriority) Change the priority of this objective.floatGet the current priority of this objective.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface TacticalObjective
getDescription, objectiveAttained, situationContributeToTheObjective
-
Field Details
-
priority
private float priority
-
-
Constructor Details
-
AbstractTacticalObjective
public AbstractTacticalObjective(float priority)
-
-
Method Details
-
getPriority
public float getPriority()Description copied from interface:TacticalObjectiveGet the current priority of this objective.- Specified by:
getPriorityin interfaceTacticalObjective- Returns:
- The current priority of this objective.
-
changePriority
public float changePriority(float newPriority) Description copied from interface:TacticalObjectiveChange the priority of this objective.- Specified by:
changePriorityin interfaceTacticalObjective- Parameters:
newPriority- The new priority.- Returns:
- The old priority.
-