public class HeadlessSuperKarel extends HeadlessKarel
| Modifier and Type | Field and Description |
|---|---|
static Color |
BLACK |
static Color |
BLUE |
static Color |
CYAN |
static Color |
DARK_GRAY |
static Color |
GRAY |
static Color |
GREEN |
static Color |
LIGHT_GRAY |
static Color |
MAGENTA |
static Color |
ORANGE |
static Color |
PINK |
static Color |
RED |
static Color |
WHITE |
static Color |
YELLOW |
CENTER| Constructor and Description |
|---|
HeadlessSuperKarel() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
beepersInBag() |
boolean |
beepersPresent() |
protected void |
checkWorld(String caller) |
boolean |
cornerColorIs(Color color) |
boolean |
cornerColorIs(double red,
double blue,
double green) |
boolean |
cornerColorIs(int rgb) |
boolean |
facingEast() |
boolean |
facingNorth() |
boolean |
facingSouth() |
boolean |
facingWest() |
boolean |
frontIsBlocked() |
boolean |
frontIsClear() |
int |
getBeepersInBag() |
int |
getDirection() |
Point |
getLocation() |
KarelWorld |
getWorld() |
boolean |
leftIsBlocked() |
boolean |
leftIsClear() |
static void |
main(String[] args) |
Color |
newColor(int rgb) |
boolean |
noBeepersInBag() |
boolean |
noBeepersPresent() |
boolean |
notFacingEast() |
boolean |
notFacingNorth() |
boolean |
notFacingSouth() |
boolean |
notFacingWest() |
void |
paintCorner(Color color) |
void |
paintCorner(double red,
double blue,
double green) |
void |
paintCorner(int rgb) |
void |
pause(double milliseconds) |
void |
pickBeeper() |
void |
putBeeper() |
boolean |
random() |
boolean |
random(double p) |
boolean |
rightIsBlocked() |
boolean |
rightIsClear() |
void |
run() |
void |
say(String text)
Causes Karel to pop up a speech bubble with the given text in it.
|
void |
setBeepersInBag(int nBeepers) |
void |
setDirection(int dir) |
void |
setDisplayOneFlag(boolean flag) |
void |
setLocation(int x,
int y) |
void |
setLocation(Point pt) |
void |
setParameterTable(Map<String,String> table) |
void |
setStartupObject(Object obj) |
void |
setWorld(KarelWorld world) |
void |
start(String[] args)
Starts a
KarelProgram containing this Karel instance,
passing it the specified arguments. |
void |
turnAround() |
void |
turnLeft() |
void |
turnRight() |
exit, getLocationsVisited, getSaveFile, getTitle, getWorldFile, hasVisited, hasVisited, init, move, print, print, printf, println, println, println, setExitEnabled, setSaveFile, setTitle, setTrackLocationsVisited, setWorldFile, startpublic static final Color BLACK
public static final Color BLUE
public static final Color CYAN
public static final Color DARK_GRAY
public static final Color GRAY
public static final Color GREEN
public static final Color LIGHT_GRAY
public static final Color MAGENTA
public static final Color ORANGE
public static final Color PINK
public static final Color RED
public static final Color WHITE
public static final Color YELLOW
public void run()
run in interface ProgramInterfacerun in interface Runnablerun in interface KarelInterfacerun in class HeadlessKarelpublic void turnRight()
public void turnAround()
public void paintCorner(Color color)
public void paintCorner(int rgb)
public void paintCorner(double red,
double blue,
double green)
public Color newColor(int rgb)
public boolean random()
public boolean random(double p)
public boolean cornerColorIs(Color color)
public boolean cornerColorIs(int rgb)
public boolean cornerColorIs(double red,
double blue,
double green)
public void pause(double milliseconds)
pause in interface ProgramInterfacepause in interface KarelInterfacepublic void say(String text)
public void turnLeft()
turnLeft in interface KarelInterfacepublic void pickBeeper()
pickBeeper in interface KarelInterfacepublic void putBeeper()
putBeeper in interface KarelInterfacepublic boolean frontIsClear()
frontIsClear in interface KarelInterfacepublic boolean frontIsBlocked()
frontIsBlocked in interface KarelInterfacepublic boolean leftIsClear()
leftIsClear in interface KarelInterfacepublic boolean leftIsBlocked()
leftIsBlocked in interface KarelInterfacepublic boolean rightIsClear()
rightIsClear in interface KarelInterfacepublic boolean rightIsBlocked()
rightIsBlocked in interface KarelInterfacepublic boolean beepersPresent()
beepersPresent in interface KarelInterfacepublic boolean noBeepersPresent()
noBeepersPresent in interface KarelInterfacepublic boolean beepersInBag()
beepersInBag in interface KarelInterfacepublic boolean noBeepersInBag()
noBeepersInBag in interface KarelInterfacepublic boolean facingNorth()
facingNorth in interface KarelInterfacepublic boolean facingEast()
facingEast in interface KarelInterfacepublic boolean facingSouth()
facingSouth in interface KarelInterfacepublic boolean facingWest()
facingWest in interface KarelInterfacepublic boolean notFacingNorth()
notFacingNorth in interface KarelInterfacepublic boolean notFacingEast()
notFacingEast in interface KarelInterfacepublic boolean notFacingSouth()
notFacingSouth in interface KarelInterfacepublic boolean notFacingWest()
notFacingWest in interface KarelInterfacepublic static void main(String[] args)
public void setParameterTable(Map<String,String> table)
setParameterTable in interface ProgramInterfacepublic void setStartupObject(Object obj)
setStartupObject in interface ProgramInterfacepublic void start(String[] args)
KarelProgram containing this Karel instance,
passing it the specified arguments.start in interface ProgramInterfacepublic Point getLocation()
getLocation in interface KarelInterfacepublic void setLocation(Point pt)
setLocation in interface KarelInterfacepublic void setLocation(int x,
int y)
setLocation in interface KarelInterfacepublic int getDirection()
getDirection in interface KarelInterfacepublic void setDirection(int dir)
setDirection in interface KarelInterfacepublic int getBeepersInBag()
getBeepersInBag in interface KarelInterfacepublic void setBeepersInBag(int nBeepers)
setBeepersInBag in interface KarelInterfacepublic KarelWorld getWorld()
getWorld in interface KarelInterfacepublic void setWorld(KarelWorld world)
setWorld in interface KarelInterfaceprotected void checkWorld(String caller)
public void setDisplayOneFlag(boolean flag)