Minesweeper Game Project

Description

For this project, I used C++ and SMFL to recreate the interactive game of Minesweeper. As a player clicks on a tile, a clear tile, number or bomb under it will be revealed. The goal of the game is to reveal all of the tiles without revealing a tile with a bomb. If the player wants to reveal a tile, they will left click and if they want to flag a tile as a potential bomb, they will right click. While left clicking through tiles to reveal what is underneath, a recursive algorithm is implemented to reveal adjacent clear tiles until it reaches a tile with a number.

I developed a class object to store the various tile-related values of every tile displayed on the board of the game. I also created buttons that allowed the player to reset the game and load a different board. One if the most difficult parts of this project was creating the recursive function of the game as this part required the consideration of many edge cases.

Demo

This image demonstrates what the elements of the game interface looks like.