|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnanomunchers.bot.NanoBot
Reprsents the humble Nanomuncher
Field Summary | |
protected boolean |
alive
|
protected int |
cycle
|
static int |
DOWN
|
protected int[] |
instructionOrder
|
static int |
LEFT
|
protected Node |
location
|
protected int |
nodesMunched
|
protected int |
positionDelta
|
static int |
RIGHT
|
protected Node |
startPosition
|
static int |
UP
|
Constructor Summary | |
NanoBot(java.lang.String instOrder,
Node start)
Creates a new nanomuncher. |
Method Summary | |
void |
clear()
Renews the nanomuncher to its inital place and diet. |
java.lang.String |
getCode()
|
Node |
getCurrentLocation()
|
int |
getDirection()
|
int |
getNodesMunched()
|
boolean |
isAlive()
|
void |
kill()
Kills the nanomuncher. |
void |
move()
Actually performs the move. |
Node |
nextMove()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int UP
public static final int LEFT
public static final int DOWN
public static final int RIGHT
protected int nodesMunched
protected boolean alive
protected int cycle
protected int positionDelta
protected int[] instructionOrder
protected Node startPosition
protected Node location
Constructor Detail |
public NanoBot(java.lang.String instOrder, Node start)
instOrder
- "LRUD" for examplestart
- Method Detail |
public Node nextMove()
public void move()
public int getDirection()
public int getNodesMunched()
public boolean isAlive()
public void kill()
public void clear()
public Node getCurrentLocation()
public java.lang.String getCode()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |