demo.helicopter
Class RuleCoordinate

java.lang.Object
  extended bydemo.helicopter.RuleCoordinate
All Implemented Interfaces:
Rule

public class RuleCoordinate
extends java.lang.Object
implements Rule

RuleCoordinate implements the Rule interface in the RELATE architecture. This rule coordinates the forces of the squad relationship.

Since:
JDK1.2
Version:
1.0, 17 Aug 00
Author:
Michael R. Dickson, Kimberly A. Roddy

Constructor Summary
RuleCoordinate()
          Default constructor
 
Method Summary
 java.lang.Object calculate(SensedEnvironment pPE)
          Uses the passed in perceived environment as input to a calculation which selects one of a finite number of previously defined (and enumerated) actions to be returned.
 void issueOrders(CTFAgent pCTFAgent)
          Tests to see how many tanks and if there is one assigns it the defensive goal all others will be assigned the offensive goal.
 java.lang.String toString()
          returns the name of the rule.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RuleCoordinate

public RuleCoordinate()
Default constructor

Method Detail

issueOrders

public void issueOrders(CTFAgent pCTFAgent)
Tests to see how many tanks and if there is one assigns it the defensive goal all others will be assigned the offensive goal.


calculate

public java.lang.Object calculate(SensedEnvironment pPE)
Uses the passed in perceived environment as input to a calculation which selects one of a finite number of previously defined (and enumerated) actions to be returned.

Specified by:
calculate in interface Rule
Parameters:
pPE - The PerceivedEnvironment that the Rule uses to calculate the action determined by this Rule.
Returns:
An integer corresponding to the action selected by this calculation.

toString

public java.lang.String toString()
returns the name of the rule.

Specified by:
toString in interface Rule
Returns:
the String representation of the rule name.