uk.ac.nott.cs.g54dia.demo
Class DemoTanker

java.lang.Object
  extended by uk.ac.nott.cs.g54dia.library.Tanker
      extended by uk.ac.nott.cs.g54dia.demo.DemoTanker

public class DemoTanker
extends Tanker

A simple example tanker that chooses actions.


Field Summary
 
Fields inherited from class uk.ac.nott.cs.g54dia.library.Tanker
FUEL_PUMP_LOCATION, MAX_FUEL, MAX_WATER, VIEW_RANGE
 
Constructor Summary
DemoTanker()
           
 
Method Summary
 Action senseAndAct(Cell[][] view, long timestep)
          Sub-classes must implement this method to provide the "brains" for the Tanker.
 
Methods inherited from class uk.ac.nott.cs.g54dia.library.Tanker
getCompletedCount, getCurrentCell, getFuelLevel, getPosition, getScore, getWaterLevel, incCompleted, useFuel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DemoTanker

public DemoTanker()
Method Detail

senseAndAct

public Action senseAndAct(Cell[][] view,
                          long timestep)
Description copied from class: Tanker
Sub-classes must implement this method to provide the "brains" for the Tanker.

Specified by:
senseAndAct in class Tanker
Parameters:
view - the cells the Tanker can currently see
timestep - The current timestep
Returns:
an action to perform