"Betelgeuse" design
BeeperHunt
Class Maze
public Maze(int size) - Constructs a Maze of the specified size (squared) .
public Object getElementAt(int row, int col) - Returns the object at location int row, int col in the maze.
Class Node
public Node(int x, int y) - Constructs a Node with the specified x and y coordinates.
public int getXCoordinate() - Returns this node's x-coordinate.
public int getYCoordinate() - Returns this node's y-coordinate.
public boolean hasLeftConnection() - Returns true if there is a connection with this node's left neighbor.
public void setLeftConnection() - Sets a connection between this node and the left neighbor in the maze.
public boolean hasRightConnection() - Returns true if there is a connection with this node's right neighbor.
public void setRightConnection() - Sets a connection between this node and the right neighbor in the maze.
public boolean hasTopConnection() - Returns true if there is a connection with this node's top neighbor.
public void setTopConnection() - Sets a connection between this node and the top neighbor in the maze.
public boolean hasBottomConnection() - Returns true if there is a connection with this node's bottom neighbor.
public void setBottomConnection() - Sets a connection between this node and the bottom neighbor in the maze.
public boolean equals(Object o)
Class Beeper
public Beeper() - Constructs a Beeper.
public int reduceDuration() - Decrements the amount of time this beeper appears.
public int getDuration() - Gets this beeper's lifetime.
public Node getPosition() - Gets the node at which this beeper is located.
Class Robot
public Robot(Maze maze) - Constructs a Robot. Takes the maze as a parameter.
public void move() - Moves the robot one step.
public int getBeeperCount() - Returns the number of beepers collected.
public int incrementBeeperCounter() - Increments the number of beepers collected.
public void collectBeeper() - Picks up a beeper.
Class BeeperHunt
final static int GAME_DURATION - The total steps in a game.
public BeeperHunt() - Constructor for BeeperHunt.
public void run()
public static void main(String[] args)