demo.helicopter
Class RuleOffense1

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

public class RuleOffense1
extends java.lang.Object
implements Rule

RuleOffense1 implements the Rule interface in the RELATE architecture. This rule directs the agent to the enemy flag at max speed.

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

Constructor Summary
RuleOffense1()
          Default constructor
 
Method Summary
 java.lang.Object calculate(SensedEnvironment pPE)
          Returns an Integer to be put in the protocol vector indicating which piece of code the agent uses in the ActionInterpreter.
 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

RuleOffense1

public RuleOffense1()
Default constructor

Method Detail

calculate

public java.lang.Object calculate(SensedEnvironment pPE)
Returns an Integer to be put in the protocol vector indicating which piece of code the agent uses in the ActionInterpreter.

Specified by:
calculate in interface Rule
Parameters:
pPE - The PerceivedEnvironment .
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.