pacman.menu
Class MenuFunction

java.lang.Object
  extended by pacman.menu.MenuFunction
Direct Known Subclasses:
MenuFunction.Control, MenuFunction.Load_Game, MenuFunction.New_Game, MenuFunction.Quit, MenuFunction.Save_Game, MenuFunction.Sound, MenuFunction.View_Scores

public abstract class MenuFunction
extends java.lang.Object

Defines the functions used on the main menu's buttons.


Nested Class Summary
(package private) static class MenuFunction.Control
          The function associated with the Control button; provides options for modifying the controls (not implemented).
(package private) static class MenuFunction.Load_Game
          The function associated with the Load Game button; loads a previously saved game (not implemented).
(package private) static class MenuFunction.New_Game
          The function associated with the New Game button; starts a new game.
(package private) static class MenuFunction.Quit
          The function associated with the Quit button; exits the program.
(package private) static class MenuFunction.Save_Game
          The function associated with the Save Game button; saves the game (not implemented).
(package private) static class MenuFunction.Sound
          The function associated with the Sound button; provides options for configuring the sound (not implemented).
(package private) static class MenuFunction.View_Scores
          The function associated with the View Scores button; displays the high scores (not implemented).
 
Field Summary
protected  MenuPanel mp
          The parent MenuPanel
 
Constructor Summary
MenuFunction(MenuPanel m)
          Constructs a new MenuFunction, setting the parent MenuPanel variable to the passed MenuPanel argument
 
Method Summary
abstract  void execute()
          Abstract execute method; each MenuFunction contains this method and implements its own code to perform its action.
abstract  java.lang.String getName()
          Abstract getName method; each MenuFunction contains code in this method to return a string version of its name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mp

protected MenuPanel mp
The parent MenuPanel

Constructor Detail

MenuFunction

public MenuFunction(MenuPanel m)
Constructs a new MenuFunction, setting the parent MenuPanel variable to the passed MenuPanel argument

Method Detail

execute

public abstract void execute()
Abstract execute method; each MenuFunction contains this method and implements its own code to perform its action.


getName

public abstract java.lang.String getName()
Abstract getName method; each MenuFunction contains code in this method to return a string version of its name.