net.sf.colossus.ai.objectives
Class DestroyCreatureTacticalObjective

java.lang.Object
  extended by net.sf.colossus.ai.objectives.AbstractTacticalObjective
      extended by net.sf.colossus.ai.objectives.DestroyCreatureTacticalObjective
All Implemented Interfaces:
TacticalObjective

 class DestroyCreatureTacticalObjective
extends AbstractTacticalObjective

The tactical objective of killing a certain number of a specific CreatureType. The evaluation function currently return the highest amount of point gang-banging any one of the creaturetype in the opposing legion, multiplied by the priority. Rangestriker count for half. This is capped to 0 if the objective is already attained. The objective is attained whenever the number of creature are missing in the opposing legion.

Author:
Romain Dolbeau

Field Summary
private  Client client
           
private  int count
           
private  Creature critter
           
private  Legion killlegion
           
private static java.util.logging.Logger LOGGER
           
private  int number
           
 
Constructor Summary
DestroyCreatureTacticalObjective(float priority, Client client, Legion killlegion, Creature critter, int number)
           
 
Method Summary
 java.lang.String getDescription()
          Get the description of this objective.
 boolean objectiveAttained()
          Whether the objective is already achieved
 ValueRecorder situationContributeToTheObjective()
          How much does the 'current situation' contributes to the objective.
 
Methods inherited from class net.sf.colossus.ai.objectives.AbstractTacticalObjective
changePriority, getPriority
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

private static final java.util.logging.Logger LOGGER

critter

private final Creature critter

killlegion

private final Legion killlegion

client

private final Client client

count

private final int count

number

private final int number
Constructor Detail

DestroyCreatureTacticalObjective

DestroyCreatureTacticalObjective(float priority,
                                 Client client,
                                 Legion killlegion,
                                 Creature critter,
                                 int number)
Method Detail

objectiveAttained

public boolean objectiveAttained()
Description copied from interface: TacticalObjective
Whether the objective is already achieved

Returns:
Whether the objective is already achieved

situationContributeToTheObjective

public ValueRecorder situationContributeToTheObjective()
Description copied from interface: TacticalObjective
How much does the 'current situation' contributes to the objective. The actual value is currently added to the overall evaluation of the whole legion move.

Returns:
How much does he 'current situation' contributes to the objective

getDescription

public java.lang.String getDescription()
Description copied from interface: TacticalObjective
Get the description of this objective.

Returns:
The description of this objective.