rcssjava.trainer
Class KeepawayTask

java.lang.Object
  extended by rcssjava.trainer.KeepawayTask
All Implemented Interfaces:
Task

public class KeepawayTask
extends java.lang.Object
implements Task

Enforces the keepaway rules and monitors/logs episode durations


Constructor Summary
KeepawayTask(ServerParams sp, WorldState ws, TrainerCommandHandler cmd, boolean launchMonitor, int numKeepers, int numTakers, double kawayWidth, double kawayLength, java.lang.String kwyFile)
          Constructs a keepaway task with the given options.
 
Method Summary
 void init()
          Initialize task by resetting the field setting playmode to PlayOn
 boolean processCycle()
          Enforce rules for the previous cycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeepawayTask

public KeepawayTask(ServerParams sp,
                    WorldState ws,
                    TrainerCommandHandler cmd,
                    boolean launchMonitor,
                    int numKeepers,
                    int numTakers,
                    double kawayWidth,
                    double kawayLength,
                    java.lang.String kwyFile)
Constructs a keepaway task with the given options.

Method Detail

init

public void init()
Initialize task by resetting the field setting playmode to PlayOn

Specified by:
init in interface Task

processCycle

public boolean processCycle()
Enforce rules for the previous cycle

Specified by:
processCycle in interface Task
Returns:
false if an error occurs