karel
Class World
java.lang.Object
|
+--karel.World
- All Implemented Interfaces:
- java.io.Serializable
- public class World
- extends java.lang.Object
- implements java.io.Serializable
- See Also:
- Serialized Form
Constructor Summary |
World(int avenues,
int streets)
|
Method Summary |
void |
addEWWall(int startAvenue,
int northOfStreet,
int nBlocks)
|
void |
addNSWall(int eastOfAvenue,
int startStreet,
int nBlocks)
|
boolean |
checkBeeper(int avenue,
int street)
|
boolean |
checkEWWall(int atAvenue,
int northOfStreet)
|
boolean |
checkNSWall(int eastOfAvenue,
int atStreet)
|
boolean |
equals(java.lang.Object obj)
|
int |
getAvenues()
|
protected Corner |
getCorner(int avenue,
int street)
|
int |
getRobotStartAvenue()
|
int |
getRobotStartBeepers()
|
int |
getRobotStartDirection()
|
int |
getRobotStartStreet()
|
int |
getStreets()
|
boolean |
isInBounds(int avenue,
int street)
|
boolean |
pickBeeper(int avenue,
int street)
|
boolean |
putBeeper(int avenue,
int street)
|
void |
setRobotStartAvenue(int avenue)
|
void |
setRobotStartBeepers(int beepers)
|
void |
setRobotStartDirection(int dir)
|
void |
setRobotStartStreet(int street)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
World
public World(int avenues,
int streets)
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
getAvenues
public int getAvenues()
getStreets
public int getStreets()
getCorner
protected Corner getCorner(int avenue,
int street)
setRobotStartAvenue
public void setRobotStartAvenue(int avenue)
getRobotStartAvenue
public int getRobotStartAvenue()
setRobotStartStreet
public void setRobotStartStreet(int street)
getRobotStartStreet
public int getRobotStartStreet()
setRobotStartDirection
public void setRobotStartDirection(int dir)
getRobotStartDirection
public int getRobotStartDirection()
setRobotStartBeepers
public void setRobotStartBeepers(int beepers)
getRobotStartBeepers
public int getRobotStartBeepers()
checkEWWall
public boolean checkEWWall(int atAvenue,
int northOfStreet)
checkNSWall
public boolean checkNSWall(int eastOfAvenue,
int atStreet)
addEWWall
public void addEWWall(int startAvenue,
int northOfStreet,
int nBlocks)
addNSWall
public void addNSWall(int eastOfAvenue,
int startStreet,
int nBlocks)
isInBounds
public boolean isInBounds(int avenue,
int street)
checkBeeper
public boolean checkBeeper(int avenue,
int street)
pickBeeper
public boolean pickBeeper(int avenue,
int street)
throws KarelNoBeeperAtCornerException
putBeeper
public boolean putBeeper(int avenue,
int street)