Skip to content

Implementation of Minesweeper in Wolfram's Mathematica using a board consisting of a tesselation, rather than the standard matrix of squares.

License

Notifications You must be signed in to change notification settings

ArctynFox/Matheminesweeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Matheminesweeper

Developed in a pair for a university course focusing on proficiency in Wolfram's Mathematica, this game attempts to recreate the classic Minesweeper in the aforementioned language, with the twist of using a tesselated pattern of dodecagons, hexagons, and squares.

Play by running the Matheminesweeper.nb file via Wolfram Player: https://www.wolfram.com/player/

Screenshots

image image image

Game boards of any size are possible, however Mathematica seems to limit the number of calculations that can be performed in a windowed graphic, so boards larger than a size of 7 (radial) will only run in the notebook view itself (and take a long time to process each action).

Interesting Developmental Point About This Project

We had to determine a convenient data structure to use for grids that would work no matter the size of the board. In the end, we decided to use a polar tile index system, as shown in the following image:

image

We start with the center tile, then move out one layer and number them clockwise, and then move out another layer and repeat. Each of these tile indices would have three flags, those being whether it is a bomb, whether it has been flagged, and if it has been opened.

This also posed an interesting problem in which, because Mathematica is not a render engine, we needed to determine manually the correlation between what location in the graphic was clicked and what tile was actually clicked.

About

Implementation of Minesweeper in Wolfram's Mathematica using a board consisting of a tesselation, rather than the standard matrix of squares.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published