|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.columbia.cs.coms4701.agent.environments.robot.RoombaAction
public class RoombaAction
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.)
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 |
---|
public static final RobotAction NORTH
public static final RobotAction SOUTH
public static final RobotAction EAST
public static final RobotAction WEST
public static final RobotAction[] ACTIONS
Method Detail |
---|
public java.lang.String toString()
AgentAction
toString
in interface AgentAction
toString
in class java.lang.Object
public DiscreteVector getVector()
getVector
in interface RobotAction
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |