Class MineSweeperMenuHandler

java.lang.Object
  extended byMineSweeperMenuHandler
All Implemented Interfaces:
ActionListener, EventListener

public class MineSweeperMenuHandler
extends Object
implements ActionListener


Field Summary
static int BEGINNER_LEVEL
          A constant value representing the easiest level of play.
static int EXPERT_LEVEL
          A constant value representing the hardest level of play.
static int INTERMEDIATE_LEVEL
          A constant value representing an intermediate level of play.
 
Constructor Summary
MineSweeperMenuHandler(JMenu lm, JMenu gm)
          Creates a new MineSweeperMenuHandler object.
 
Method Summary
 void actionPerformed(ActionEvent e)
          An event handler that interprets menu selections on the games two menus.
 void actLikeStart()
          Start playing the game.
 void resetMenus()
          Resets the state of the menus once the game has ended.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BEGINNER_LEVEL

public static final int BEGINNER_LEVEL
A constant value representing the easiest level of play.

See Also:
Constant Field Values

EXPERT_LEVEL

public static final int EXPERT_LEVEL
A constant value representing the hardest level of play.

See Also:
Constant Field Values

INTERMEDIATE_LEVEL

public static final int INTERMEDIATE_LEVEL
A constant value representing an intermediate level of play.

See Also:
Constant Field Values
Constructor Detail

MineSweeperMenuHandler

public MineSweeperMenuHandler(JMenu lm,
                              JMenu gm)
Creates a new MineSweeperMenuHandler object.

Parameters:
lm - the level menu to use
gm - the game menu to use
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
An event handler that interprets menu selections on the games two menus.

Specified by:
actionPerformed in interface ActionListener
Parameters:
e - the event to respond to

actLikeStart

public void actLikeStart()
Start playing the game.


resetMenus

public void resetMenus()
Resets the state of the menus once the game has ended.