I coded Minesweeper in C++ with a graphical interface using the Simple and Fast Multimedia Library (SFML) (https://www.sfml-dev.org/). The image files for the game were given.
ABOUT
The goal of Minesweeper (originally published 1990 as a part of Windows) is to reveal all the empty cells in the grid without revealing a mine. You can flag cells if you know they are mines as a strategy. Additionally, in my version I implemented a timer (along with a pause button), debug button (which shows all the mines for testing purposes) and leaderboard.
GAMEPLAY CAPTURES
Start window
Start window
Game window: board initialized
Game window: board initialized
Game window: in progress
Game window: in progress
Game window: paused
Game window: paused
Game window: debug mode
Game window: debug mode
Game window: game lost
Game window: game lost
Game window: game lost
Game window: game lost
Leaderboard window: game won, current player starred
Leaderboard window: game won, current player starred
GAMEPLAY VIDEO
FEATURES
Start Window
• You can enter your name (automatically capitalizes first and the rest lower case)

Game Window
• Makes a grid the size specified in the board configure file
• Randomly places the number of mines specified in the board configure file
• Displays an active count of the mines (which decreases or increases as you place or remove flags)
• Left click cells to reveal (recursive revealing if the cell is not adjacent to a mine; cannot reveal flagged cells)
• Right click cells to place or remove a flag
• Displays the game timer
• Face button which displays the state of the game (in progress, won, or lost) and allows restart
• Debug button which toggles visibility of all the mines
• Pause / play button (pauses timer and locks grid when paused)
• Leaderboard button which opens the leaderboard window (pauses timer and locks grid when leaderboard is open)
• Win if all empty cells are revealed; stops timer, locks board, and opens the leaderboard window
• Lose if mine is revealed; stops timer and locks board

Leaderboard Window
• Stores and displays the top 5 fastest times and player names
• Stars the current player if their time placed
Back to Top