public class Robot
extends SBiped
Constructor and Description |
---|
Robot() |
Robot(int x,
int y)
Constructs a robot at a given grid location.
|
Modifier and Type | Method and Description |
---|---|
void |
dropBottle()
Drops a bottle at the current location of this robot.
|
boolean |
frontHasWallorWindow()
Checks whether there is a wall or window in front of this robot.
|
void |
moveForward()
Moves this robot one step in the direction that it is facing.
|
boolean |
rightHasWall()
Checks whether there is a wall to the right of this robot.
|
void |
setVehicle(SThing vehicle) |
java.lang.String |
toString() |
void |
turnLeft()
Turns this robot left.
|
void |
turnRight()
Turns this robot right.
|
public Robot(int x, int y)
x
- the x location of the roboty
- the y location of the robotpublic Robot()
public void setVehicle(SThing vehicle)
public void moveForward()
public void turnLeft()
public void turnRight()
public boolean frontHasWallorWindow()
public boolean rightHasWall()
public void dropBottle()
public java.lang.String toString()