bot
Class BotBoard

java.lang.Object
  extended bybot.BotBoard
Direct Known Subclasses:
MakerBoard

public class BotBoard
extends Object

The interface between a Bot and the actual board. Maintains where the bot is, and all that.


Constructor Summary
BotBoard(Bot bot, Board board)
          Make board connecting passed bot with passed board.
 
Method Summary
protected  void endAction()
           
 Square getAdjacentSquare(int dir)
          Get adjacent square to bot.
 Board getBoard()
          Return board the BotBoard is running the bot on.
 Bot getBot()
          Return the bot the botboard is managing.
 int getHeading()
          Return direction bot is facing.
 Informer getInformer()
          Return the display that is being used to show the bot's activities.
 Point getLocation()
          Where bot is.
 Square getSquare()
          Return square bot is standing on.
 void jump(Square s)
          Teleport bot to given square.
 void message(String s)
          This does a say without the delay or checking for time and all that.
 void setInformer(Informer inf)
          Set the display device for the board to given informer.
 boolean won()
          This returns true if the bot has currently filled the win conditions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BotBoard

public BotBoard(Bot bot,
                Board board)
Make board connecting passed bot with passed board.

Method Detail

setInformer

public void setInformer(Informer inf)
Set the display device for the board to given informer.


getSquare

public Square getSquare()
Return square bot is standing on.

Returns:
Square bot is on.

getLocation

public Point getLocation()
Where bot is.

Returns:
The (x,y) cordinates of bot.

getAdjacentSquare

public Square getAdjacentSquare(int dir)
Get adjacent square to bot.

Returns:
Square next to bot's current square in given direction/

endAction

protected void endAction()

jump

public void jump(Square s)
Teleport bot to given square.


getHeading

public int getHeading()
Return direction bot is facing.


message

public void message(String s)
This does a say without the delay or checking for time and all that.


won

public boolean won()
This returns true if the bot has currently filled the win conditions.


getInformer

public Informer getInformer()
Return the display that is being used to show the bot's activities.


getBoard

public Board getBoard()
Return board the BotBoard is running the bot on.


getBot

public Bot getBot()
Return the bot the botboard is managing.