Minesweeper 3 Documentation
© Daniel D'Agostino 2007
Contents
How to play
The goal is to clear all the squares that don't have a mine.
- Left-click to clear a square.
- When you click on a square, a number shows you how many mines are adjacent.
- If there are no mines adjacent, then the adjacent squares will be cleared.
- If you hit a mine, you lose.
- Use flags (right-click) to mark locations where you think there is a mine. If you accidentally click on a flagged square, you will not hit the mine beneath.
- If all the mines adjacent to a number have been flagged, you can click both the left and right mouse buttons at the same time on the number to clear the remaining adjacent squares.
- To start a new game, click on the little face at the bottom or press F2 or N.
- You cannot hit a mine on your first click.
Keyboard controls
- F2 or N: new game
- B: beginner mode
- I: intermediate mode
- E: expert mode
- ESC or Q: quit
Customising your game
Running your game from the command line allows you to customise your game as
you want, allowing you to set the width and height of the grid, the number of
mines there are, choose a predefined mode, or even cheat.
You can run Minesweeper normally by simply typing minesweeper
and pressing Enter. The default mode is the Expert mode.
However, you can use additional parameters that allow you to customise your
game. The following parameters are possible:
- width - defines the width in tiles of each row
- height - defines the height in tiles of each column
- mines - defines the number of mines on the field
- mode - selects a predefined mode
- cheat - allows you to see where all the mines are placed
Each parameter must be followed by an equals sign (=), which in turn must
be followed by an appropriate value. The values of width,
height and mines must be a number. The value of
mode must be either beginner, intermediate
or expert. If you want to turn on the cheat, its value must be set
to true.
You can use any combination of these parameters, and there is no particular
order in which you must write them. Keep in mind that while setting the mode
will set the width, height and mines, setting either width, height or mines
separately will override what is set by the mode.
Here are some examples:
C:\Minesweeper>minesweeper
C:\Minesweeper>minesweeper width=50 height=20
C:\Minesweeper>minesweeper mode=beginner cheat=true
If you want to keep some settings, you can create a batch file and store them
there, and this will allow you to run the game with those settings whenever you
want, by just double-clicking on the batch file.
To create a batch file, create a text file with the extension .bat. Then
just type whatever you would type in the command line. For example, you can
create a file called intermediate.bat with the following content:
minesweeper mode=intermediate
Limitations
If you were free to set any values you wanted for the game, you would
end up with unexpected crashes. The following limitations have been set:
- Your width and height cannot be less than 9 tiles long.
- There can be up to (area-1) mines. If you could have more, crashes would occur.
These limitations have only been set to avoid crashes that may be flaws within
the program. You can raise the field area to the sky and make it too big to fit
on your screen, and you can abuse it like this as much as you want, but you do
so at your own risk.
Changes from Microsoft Minesweeper
- Question marks cannot be used.
- The flag counter counts how many flags have been used, not how many are left to be used.
Changes from my Minesweeper 1
- Game does not use 100% CPU.
- Tiles react when you hover over them with your cursor.
- The newgame icon is different and changes expression with certain actions.
- Clicks are taken into account when you release the button, not as soon as you click.
- Clearing empty areas works.
- The timer does not have a smooth transmission between seconds... this prevents 100% CPU usage.
- Beginner mode and minimum dimensions is 9x9, not 10x10.
- Expert mode has 99 mines like in the original Microsoft Minesweeper.
- Minefield can handle area-1 mines, instead of needing a mine density ratio (area/mines) > 4.5.
Changes from Minesweeper 2
- Multithreading allowed the implementation of a real timer, which neither uses 100% CPU nor works only when the mouse is moved.
- Hovering over tiles causes them to fade or pulse.
- Clicks are still taken into account when you release the button, but no temporary 'depressed' tile is shown while you hold the mouse button down.