Minesweeper
Play the classic Minesweeper game in AutoCAD.
Getting Started
To launch the plug-in, use the following command(s)
MINESWEEPER
Launches a Minesweeper game in a new drawing.
Usage
Click on the Minesweeper button on the Plug-ins ribbonbar tab, or type MINESWEEPER at the command line to start a new game. This will create a new drawing.
In the new drawing window, you will be prompted at the command line to enter the width and height of the minefield grid, and the number of mines in the minefield (which must be less than the total number of cells in the grid).
Once this information is entered, Minesweeper will construct the minefield. Uncovered squares in the minefield will be displayed as X.
Click on an X in the minefield to uncover that cell. The uncovered cell will display a * if the cell you uncovered contains a mine (and the game will end); or it will display the number of mines in adjacent cells (including diagonally adjacent cells).
- Use the ‘Mark’ keyword to switch to mine marking mode. Now any uncovered cell you click on will be toggled between X and M. Use this to mark cells you think are mines.
- Use the ‘Uncover’ keyword to go back to uncover mode when you’ve finished marking mines. Marked cells cannot be uncovered until they are unmarked.
The game ends when you either uncover a mine (you lose), or uncover every cell in the minefield without clicking on a mine (you win).
Screenshots
Starting a new game
You lose
You win
Installation and Uninstallation
The installer that ran when you downloaded this plug-in from AutoCAD Exchange has already installed the plug-in. You may need to restart AutoCAD to activate the plug-in.
To uninstall this plug-in, simply rerun the installer by downloading it again from Exchange, and select the 'Uninstall' button, or you can uninstall it from 'Control Panel\Programs\Programs and Features' (Windows 7) or Add/Remove Programs (Windows XP), just as you would uninstall any other application from your system. The panel on the Plug-ins tab will not be removed until AutoCAD is restarted.
Additional Information
Please visit
http://en.wikipedia.org/wiki/Minesweeper_(computer_game) for more information on the Minesweeper game, including game strategies.
This plug-in was written by Stephen Preston, and was originally posted on Kean Walmsley’s
Through the Interface blog.
For more useful free tools and utilities with source code, visit the
ADN Plugin of the Month page on the Autodesk Labs website.
Known Issues
The game cannot be interrupted. If you cancel the MINSWEEPER command mid-game, you must start again.
For more information on developing with AutoCAD, please visit the
AutoCAD Developer Center.
Support Information
Email us at
labs.plugins@autodesk.com with feedback or requests for enhancements.
Version History