"Arcturus" design interface BeeperConstants Only holds public final constants for the simulation that descibe things like the map dimensions, number of beepers, lifespan of a beeper, etc. public static final int SUB_MAZE_HEIGHT public static final int SUB_MAZE_WIDTH public static final int MAZE_HEIGHT public static final int MAZE_WIDTH public static final int MAX_BEEPER_LIFE public static final int MAX_GAME_LIFE public static final int NUM_BEEPERS class GridNode The unit that makes up a grid. It is a cross between an array element and the node of an undirected graph. It has a value and references to four GridNodes (north, south, east, and west) public Object value The 'contents' of this node. (In our context, this may be a Beeper, a Robot, or null) public GridNode Constructor with no arguments (All fields will be null) public GridNode(Object value) Constructor that takes just a value public GridNode(Objject value, GridNode north, .....) Constructor to set all fields public void setNorth (GridNode) Stores a reference to the node to the North. public void setSouth (GridNode) public void setEast (GridNode) public void setWest (GridNode) abstract class Grid Holds an array of GridNodes. Specifies an abstract method for finding short paths. public Grid (int width, int columns) Creates an array of empty GridNodes and assures that all adjacent nodes are doubly-connected. abstract public Vector shortestPath(int fromRow, int fromColumn,int toRow,int toColumn) Will be a subclass dxefined method to determine the shortest path between two GridNodes. Returns a Vector of GridNodes that form the path.. public Object getValue (int row, int column) Returns the value of the cell at the given row and column. class Maze extends Grid Creates a maze (that meets our specifications) as a Grid. public Maze(int subMazeWidth, int subMazeHeight, int mazeWidth, int mazeHeight) Creates a maze with submazes that have spanning trees of the given size, etc. public void addBeepers(Beeper theBeeper) Puts Beeper objects into the Maze. public void addRobots(Robots theRobot) Puts Robots into the Maze. public Vector pathToLocation(int row, int column) Finds the shortest path from the Robot location to the nearest Beeper protected Vector shortestPath (int fromRow, int fromColumn,int toRow,int toColumn) Finds the shortest path between any two points in this maze. class Robot public int getBeeperCount Returns the number of beepers that have been picked up public void pickupBeeper Increments the number of beepers held by the robot. class BeeperHunt implements Runnable, BeeperConstants The main class. Controls the simulation. Most methods will be private. public static void main (String [] args) Staring point. public void run() Called when the start button in the GUI is pressed. class MazeView extends Canvas The Canvas for drawing the maze and its contents. public MazeView(Maze theMaze) Constructor needs a Maze to illustrate. public void paint() Draws the Maze and its content. Called through repaint(). public void setCurrrentShortestPath(Vector csp) Setter for a Vector of GridNodes that represent the shortest path from the Robot to a Beeper so it can be illustrated. public class HuntView extends Frame The main container for our GUI. public HuntView(MazeView theMazeView, Panel thePanel) Constructor takes all the components that will form the GUI and sets them up. class GamePanel extends Panel The constructor builds our particular button panel, that includes the start and stop buttons, and any other UI elements. Inner classes will implement Listeners.