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/
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).
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:
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.