bot
Class CoreInformer

java.lang.Object
  extended bybot.CoreInformer
All Implemented Interfaces:
Informer
Direct Known Subclasses:
GraphicInformer, MinimalInformer

public abstract class CoreInformer
extends Object
implements Informer

A basic informer with some utility functions


Field Summary
protected  Runner runner
           
static int STATE_OVER
           
static int STATE_RESET
           
static int STATE_RUNNING
           
static int STATE_STEPPING
           
static int STATE_STOPPED
           
 
Fields inherited from interface bot.Informer
CHAR_BY_CHAR_INPUT, STRING_INPUT
 
Constructor Summary
CoreInformer(Runner runner)
           
 
Method Summary
protected  void beginAction()
          Begin a step.
 void endAction()
           
 void endGame(boolean won)
           
 void feel()
          Bot Action
 int getCurrentTime()
           
 Runner getRunner()
          Get the runner using this informer.
 void grab()
          Bot Action
 boolean inAction()
           
 void inform(String s)
          A message of something that transpired (for example, used object.)
 void land()
          Put the bot on the board.
 void place()
          Bot Action
 void relocate(Point from, Point to)
          Bot Action - when Bot changes position.
 void reset(BotBoard botboard)
          Reset the board back to a new passed board.
 void resetTick()
           
 void rest()
          Bot Action
 void say(String s)
          Bot Action--it says something
 void setAppearance(String toWhat)
          This changes what the bot looks like/is described as.
 void setBoard(Board bd)
          Setting the board to display to passed board.
protected  void tick()
           
 void touch(Point where)
          Call to say the given point has been modified.
 void turn(int new_direction)
          The bot turns to face the new passed direction.
 void waitForGo()
           
 void waitForReset()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface bot.Informer
alert, beginSimulation, getInput, pausing, redraw, selectBoard, selectBot, setInputMode
 

Field Detail

STATE_RUNNING

public static int STATE_RUNNING

STATE_STOPPED

public static int STATE_STOPPED

STATE_STEPPING

public static int STATE_STEPPING

STATE_OVER

public static int STATE_OVER

STATE_RESET

public static int STATE_RESET

runner

protected Runner runner
Constructor Detail

CoreInformer

public CoreInformer(Runner runner)
Method Detail

reset

public void reset(BotBoard botboard)
Reset the board back to a new passed board. So when the user resets back to start.

Specified by:
reset in interface Informer

setBoard

public void setBoard(Board bd)
Setting the board to display to passed board.

Specified by:
setBoard in interface Informer

beginAction

protected void beginAction()
Begin a step.


inAction

public boolean inAction()

endAction

public void endAction()
Specified by:
endAction in interface Informer

land

public void land()
Put the bot on the board.

Specified by:
land in interface Informer

turn

public void turn(int new_direction)
The bot turns to face the new passed direction.

Specified by:
turn in interface Informer

rest

public void rest()
Description copied from interface: Informer
Bot Action

Specified by:
rest in interface Informer

say

public void say(String s)
Description copied from interface: Informer
Bot Action--it says something

Specified by:
say in interface Informer

inform

public void inform(String s)
Description copied from interface: Informer
A message of something that transpired (for example, used object.)

Specified by:
inform in interface Informer
Parameters:
s - The message to display.

grab

public void grab()
Description copied from interface: Informer
Bot Action

Specified by:
grab in interface Informer

feel

public void feel()
Description copied from interface: Informer
Bot Action

Specified by:
feel in interface Informer

place

public void place()
Description copied from interface: Informer
Bot Action

Specified by:
place in interface Informer

endGame

public void endGame(boolean won)
Specified by:
endGame in interface Informer

tick

protected void tick()

resetTick

public void resetTick()

relocate

public void relocate(Point from,
                     Point to)
Description copied from interface: Informer
Bot Action - when Bot changes position.

Specified by:
relocate in interface Informer

getCurrentTime

public int getCurrentTime()
Specified by:
getCurrentTime in interface Informer

getRunner

public Runner getRunner()
Description copied from interface: Informer
Get the runner using this informer. Null means no runner has been set.

Specified by:
getRunner in interface Informer

touch

public void touch(Point where)
Call to say the given point has been modified.

Specified by:
touch in interface Informer

setAppearance

public void setAppearance(String toWhat)
This changes what the bot looks like/is described as.

Specified by:
setAppearance in interface Informer

waitForGo

public void waitForGo()

waitForReset

public void waitForReset()
Specified by:
waitForReset in interface Informer