Classic Minesweeper mini-game for Dynamics AX 2012

Classic Minesweeper mini-game for Dynamics AX 2012

Tutorial
Published on
Sep 11, 2015

As you might already know, there are a few minigames in Microsoft Dynamics AX to be found, like tutorial_Tetris and tutorial_Memory but there is no minesweeper and that is a shame.

I decided I need to fix that, so I created my own version. Algorithm used to uncover tiles when empty spot is reached is a simple brute force algorithm that starts from the tiles in nearest proximity, it is also a very good example of using recurrence in Dynamics AX. Inside you can also see how to create form from the code and it is also a good example of extending batch class.

In the game there are three levels easy, medium and hard. For beginners I suggest easy first.

 

Goal:

Uncover all tiles without stumbling upon a bomb.

Controls:

Left mouse click – uncovering tile, right mouse click – marking tile

Rules:

If there is bomb next to a given tile the tile will be incremented by one, for example if you see tile with value 3, you can be sure that three bombs are ‘touching’ this tile.

Installation:

Download the .xpo file available here, and import it to Dynamics AX (shortcut is Ctrl + Shift + I in AOT).

Share it
Written by
Andrzej Lapinski

Student at the Wroclaw University of Technology. Passionate about science and technology. Main areas of interest are probability theory and machine learning. Currently I am working with X++ and Microsoft Dynamics.