|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectMineSweeper
An implementation of the Mine Sweeper game.
Constructor Summary | |
MineSweeper()
|
Method Summary | |
static void |
endGame()
End the current game. |
static void |
gameWasLost()
End the current game, reveal the board, and show an appropriate message to the player. |
static void |
gameWasWon()
End the current game, reveal the board, and show an appropriate message to the player. |
static int |
getLevel()
Get the current game level setting. |
static boolean |
isGameOn()
Determine if this game is currently being played. |
static void |
main(String[] args)
This method allows the game to be run as a stand-alone java program. |
static void |
makeNewBoard()
Create a new board, using a size and number of mines determined by the current level setting. |
static void |
reStartGameOnClick()
Restart the current game. |
static void |
revealBoard()
Reveal the board. |
static void |
setLevel(int newLevel)
Set the level of this game. |
static void |
startGame()
Start playing the current game. |
static void |
startGameOnClick()
Start playing the current game. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MineSweeper()
Method Detail |
public static void endGame()
public static void gameWasLost()
public static void gameWasWon()
public static int getLevel()
public static boolean isGameOn()
public static void main(String[] args)
args
- the arguments provided on the command line, which are
completely ignored by this program.public static void makeNewBoard()
public static void reStartGameOnClick()
public static void revealBoard()
public static void setLevel(int newLevel)
newLevel
- the game level, using one of the predefined constants
(MineSweeperMenuHandler.BEGINNER_LEVEL,
MineSweeperMenuHandler.INTERMEDIATE_LEVEL, or
MineSweeperMenuHandler.EXPERT_LEVEL)public static void startGame()
public static void startGameOnClick()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |