edu.columbia.cs.coms4701.agent.environments.robot
Class RoombaAction

java.lang.Object
  extended by edu.columbia.cs.coms4701.agent.environments.robot.RoombaAction
All Implemented Interfaces:
AgentAction, RobotAction

public class RoombaAction
extends java.lang.Object
implements RobotAction

Represents available actions for a RoombaAgent.

The four possible actions are available as static fields, named NORTH, SOUTH, EAST, and WEST.

For your convenience (?), an additional field ACTIONS contains an array of the four, to make it easier to iterate over the possibilities.

Each action can be inspected by the #getVector() method, which specifies the x- and y-delta (via GeometricVector#getComponent(X_DIM) etc.)

Version:
0.1

User: aaron Date: Aug 25, 2006 Time: 1:21:42 PM

Author:
aaron@cs

Field Summary
static RobotAction[] ACTIONS
           
static RobotAction EAST
           
static RobotAction NORTH
           
static RobotAction SOUTH
           
static RobotAction WEST
           
 
Method Summary
 DiscreteVector getVector()
          Returns the 2-D vector specifying the chosen motion.
 java.lang.String toString()
          AgentActions should override toString() to provide a reasonable short description.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NORTH

public static final RobotAction NORTH

SOUTH

public static final RobotAction SOUTH

EAST

public static final RobotAction EAST

WEST

public static final RobotAction WEST

ACTIONS

public static final RobotAction[] ACTIONS
Method Detail

toString

public java.lang.String toString()
Description copied from interface: AgentAction
AgentActions should override toString() to provide a reasonable short description.

Specified by:
toString in interface AgentAction
Overrides:
toString in class java.lang.Object
Returns:
a simple description of the action

getVector

public DiscreteVector getVector()
Returns the 2-D vector specifying the chosen motion.

Specified by:
getVector in interface RobotAction
Returns:
the vector (which should be 2D)