bot.ps
Class BackBot

java.lang.Object
  extended bybot.Bot
      extended bybot.ps.WallBot
          extended bybot.ps.BackBot

public class BackBot
extends WallBot


Field Summary
static int LEFT
           
 int recording
           
static int RIGHT
           
 Stack route
           
static int STEP
           
 
Fields inherited from class bot.Bot
board
 
Constructor Summary
BackBot()
           
 
Method Summary
 void back()
           
 void compute()
          This is what the system runs so the bot can run around the maze.
 void left()
          ACTION: Turn left 90 degrees.
protected  void record(int what)
           
 void right()
          ACTION: Turn right 90 degrees.
 void step()
          ACTION: Take a single step in the current direction.
 
Methods inherited from class bot.Bot
drop, feel, feelKey, feelPit, feelWall, getBoard, getBotBoard, getHeading, getInformer, getInput, getInputCharacter, getIntFromHuman, getLocation, getStringFromHuman, grab, place, rest, say, say, say, say, say, setAppearance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STEP

public static final int STEP
See Also:
Constant Field Values

LEFT

public static final int LEFT
See Also:
Constant Field Values

RIGHT

public static final int RIGHT
See Also:
Constant Field Values

route

public Stack route

recording

public int recording
Constructor Detail

BackBot

public BackBot()
Method Detail

record

protected void record(int what)

right

public void right()
Description copied from class: Bot
ACTION: Turn right 90 degrees.

Overrides:
right in class Bot

left

public void left()
Description copied from class: Bot
ACTION: Turn left 90 degrees.

Overrides:
left in class Bot

step

public void step()
Description copied from class: Bot
ACTION: Take a single step in the current direction.

Overrides:
step in class Bot

back

public void back()

compute

public void compute()
Description copied from class: Bot
This is what the system runs so the bot can run around the maze.

All bots need to implement this method so they can do stuff.

Overrides:
compute in class WallBot