/** * Interface to the ghost brain, which makes decisions about the ghost's * personality and movement. */ public interface GhostBrain { public enum Color { BLACK(new java.awt.Color(10, 10, 10)), RED(new java.awt.Color(175, 35, 90)), BLUE(new java.awt.Color(75, 100, 135)), GREEN(new java.awt.Color(55, 155, 65)), ORANGE(new java.awt.Color(185, 85, 20)), PURPLE(new java.awt.Color(135, 40, 175)), GOLD(new java.awt.Color(210, 190, 35)); private java.awt.Color color; private Color(java.awt.Color color) { this.color = color; } public java.awt.Color getColor() { return this.color; } } /** * Get the desired color of the ghost * @return Value of enumerated type GhostBrain.Color */ public Color getColor(); /** * Determine the next move for this ghost * @param currentX Current grid location of ghost, X-coordinate * @param currentY Current grid location of ghost, Y-coordinate * @param direction Current facing direction of ghost * @param world Map of the world * @param toWedge Map of ideal moves to reach Wedge Dude * @param wedgeX Wedge Dude current grid location, X-coordinate * @param wedgeY Wedge Dude current grid location, Y-coordinate * @return Move direction ghost where to go */ public Move nextMove(int currentX, int currentY, Direction direction, Space[][] world, Move[][] toWedge, int wedgeX, int wedgeY); }