/* * Created on Jan 27, 2005 */ package mvc373Hw3; /** Interface for a Towers of Hanoi Game Controller. * See CSE373 05wi Homework #3. * The Controller is a JPanel it can have buttons, etc. * The Controller is also responsible for notifying the View whenever * state has changed. It should do this simply by calling * towerView.repaint(); * * Concrete implementations MUST supply the following constructor: * * public TowerController (ITowerModel towerModel, ITowerView towerView); * * Normally, during the constructor the controller would place buttons, etc. * on the panel. * */ public interface ITowerController { /** Start the game in operation. This would be called once * (from the outside, such as TowerStarter) * to indicate that everything is ready for the first game to begin. * Quite possibly in some implementations there would be nothing * special to do. * * @return true if the start request can be honored; false if it cannot. */ boolean startUp(); /** End the game for good. * @return true iff the shutdown request is honored. */ boolean shutDown(); /** Request repainting of the entire controller panel, from scratch. * If the concrete class extends a Component, this is covered already * (you should NOT override it). Unless you want to do some drawing * on the controller panel, you don't even need to override paintComponent. * If you do, see notes under "Getting Started". * */ void repaint(); }