Download (SourceForge)
SourceForge Project Page
SourceForge.net Logo


by Dalkitsis Savvas (kuroSAVVAS@gmail.com)

JMinesweeper is a java implementation of the well known game "Minesweeper"

The purpose of the game is to expose all the blocks that do not contain a mine. You do that by marking several blocks as mined using the right mouse button. Doing so puts a flag on the selected block, thus preventing you from accidentally clicking on it. Each block exposed contains the number of the mines surrounding it (maximum 8). You can "un-flag" a block by right-clicking on it again (note. if "Marks" is selected in the "Game" menu right-clicking the flaged block will not result in an unflaged block but in a marked block. Explenation in a following section). Clicking using two buttons (any two buttons) on an exposed block that has as many flags as mines surrounding it, will result in exposing all of the unflaged blocks around it. Finally if you expose a mine, the game is over. You begin a new game by clicking the button with the smiley.

Explanation of the GUI

The GUI is very simple. On the top lies the menu bar, beneath it is the display area and finally on the bottom is the minefield.

The Menu Bar

The menu bar contains three menus. "Game", "Look and Feel" and "Help".

The Game menu

The first choice is "New" which starts a new game (same as clicking the smiley button). After that there is the difficulty section. "Begginer" creates a minefield of 9x9 with 10 mines, "Intermediate" creates a minefield of 16x16 with 40 mines and finally "Expert" creates a minefield of 30x16 with 99 mines. Below the difficulty section is the choice "Marks". When selected right-clicking on a flaged block will result in a marked block. A marked block can be exposed as a normal block and is only used for strategy purposes. For instance you might have doubts as to wheather a block is empty or has a mine and you cannot yet make a decision based on the information you have. You then mark it and wait for further information to be available and then you decide if it is empty or it contains a mine.

After that follows the "Hall of fame", which reveals the Hall of fame window.

The Hall of Fame window

The Hall of Fame window contains 3 tabs, for each difficulty. Each tab contains the 3 top scores. The window contains two buttons. "Reset scores", which resets all high scores and "OK" which exits the Hall of Fame. If you expose all the empty blocks and your time qualifies for a high score, you will be prompted to enter your name. When you press ok, your name and time will appear in the Hall of Fame. If you press cancel then your score will not be added.

The name window

The final choice in the "Game" menu is the "Exit" menu item, which exits the program.

The Look and Feel menu

The Look and Feel menu contains 4 different choices for the look and feel of the game. The changes take effect after a restart.

The Help menu

The first choice in the "Help" menu is the Contents menu item, which shows the contents window(this window). After that follows the "About" menu item which shows general information about the game.

The About window

The Display Area

The display area contains 3 items. From left to right those are : the mine counter, the smiley button and finally the time counter.

The Display Area

The mine counter lets you know how many blocks you have marked as flaged in relation with the number of mines that exist in the minefield. So for instance if you play the game in the "Beginner" difficulty, 10 mines exist in the field. If you mark 15 blocks as flaged, then the mine counter will display the number -5, letting you know that you have placed 5 flags more than the existing mines. You cannot place flags after the mine counter displays -99. If that is the case you must unflag some blocks in order to flag others. The smiley button will begin a new game. Finally the time counter displays the amount of time that has passed since the first block was exposed.

The Minefield

The final part of the GUI is the minefield where the game takes place. The mechanisms of the gameplay are explained in the first section of this document.