import java.awt.*; /** Provided for you, this class responds to the specified signal (probably north, south, east, west); * it is white initially, turning black when triggered */ public class HallViz extends RectViz { /** Visualize a Hall. * @param r The {@link RoomViz} for this HallViz * @param signal The name of the signal that will trigger this * visualization to turn black. It will be one of "north", "south", etc * but this class is more general than that. */ public HallViz(RoomViz r, String signal, double dx, double dy, double dwidth, double dheight) { super(r.getRoom().getPCS(), dx, dy, dwidth, dheight, r, new String[] { signal+"", signal+"forward", signal+"reverse", signal+"succeed" }, new Color[] { Color.black, Color.yellow, Color.black, Color.red }, Color.white); } }