Class Cell
java.lang.Object
|
+----Cell
- class Cell
- extends Object
- implements InfoTarget
A single cell in the grid. This is not an interface object,
just an internal representation. RobotWorld
has an array of these.
- Author:
- Peter Sagerson, petersag@wpi.edu
-
beepers
- The number of beepers in this cell.
-
debris
-
-
robot
- A reference to the robot occupying the cell, if any.
-
wall
- True if there is a wall occupying this cell.
-
x
- Location of the
Cell in the grid.
-
y
- Location of the
Cell in the grid.
-
Cell(int, int)
- Initial conditions for the
Cell: no robot, no wall, 0 beepers.
-
buildInfoString()
- From
InfoTarget.
-
buildVariableString()
- Required by
InfoTarget.
-
getX()
- From
InfoTarget.
-
getY()
- From
InfoTarget.
x
int x
- Location of the
Cell in the grid.
y
int y
- Location of the
Cell in the grid.
robot
public Robot robot
- A reference to the robot occupying the cell, if any.
wall
public boolean wall
- True if there is a wall occupying this cell.
beepers
public int beepers
- The number of beepers in this cell.
debris
public String debris
Cell
public Cell(int inX,
int inY)
- Initial conditions for the
Cell: no robot, no wall, 0 beepers.
getX
public int getX()
- From
InfoTarget. Returns x.
getY
public int getY()
- From
InfoTarget. Returns y.
buildInfoString
public String buildInfoString()
- From
InfoTarget. Returns a string that describes
this Cell. The string will be displayed in the
interface's info box.
buildVariableString
public String buildVariableString()
- Required by
InfoTarget.
- Returns:
- An empty string.
- See Also:
- InfoTarget