|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Observable kareltherobot.UrRobot kareltherobot.Robot
Robot defines the sensing capabilities of Robot objects. Your class should extend this one * if you need these capabilities.
Nested Class Summary |
Nested classes inherited from class kareltherobot.UrRobot |
UrRobot.ConnectStrategy |
Nested classes inherited from class kareltherobot.Directions |
Directions.Direction |
Field Summary |
Fields inherited from interface kareltherobot.Directions |
East, EastVal, infinity, North, NorthVal, South, SouthVal, West, WestVal |
Constructor Summary | |
Robot(int street,
int avenue,
Directions.Direction direction,
int beepers)
Create a new Robot in a specified state. |
|
Robot(int street,
int avenue,
Directions.Direction direction,
int beepers,
java.awt.Color badge)
|
Method Summary | |
boolean |
anyBeepersInBeeperBag()
Determine if the Robot has any beepers in its beeper bag. |
boolean |
facingEast()
Determine if the Robot is facing East or not. |
boolean |
facingNorth()
Determine if the Robot is facing North or not. |
boolean |
facingSouth()
Determine if the Robot is facing South or not. |
boolean |
facingWest()
Determine if the Robot is facing West or not. |
boolean |
frontIsClear()
Determines if the Robot's front is clear or if it is facing a wall. |
boolean |
nextToABeeper()
Determine if there is a beeper on the same corner as this Robot. |
boolean |
nextToARobot()
Determine if there is a Robot on the same corner as this Robot. |
Methods inherited from class kareltherobot.UrRobot |
acceptConnection, acceptConnectionFrom, connectTo, getNextCommunication, isVisible, move, neighbors, pickBeeper, putBeeper, run, send, setPause, setUserPause, setVisible, showState, toString, turnLeft, turnOff, userPause, waitForCommunication, waitForNextCommunication |
Methods inherited from class java.util.Observable |
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Robot(int street, int avenue, Directions.Direction direction, int beepers)
public Robot(int street, int avenue, Directions.Direction direction, int beepers, java.awt.Color badge)
Method Detail |
public boolean frontIsClear()
public boolean nextToABeeper()
public boolean nextToARobot()
public boolean facingNorth()
public boolean facingSouth()
public boolean facingEast()
public boolean facingWest()
public boolean anyBeepersInBeeperBag()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |