MineSweeper - Coding Challenge

MineSweeper on YouTube

This is my implementation of the classic game Minesweeper as part of a coding challenge. The idea for this project came from The Coding Train's Coding Challenge #71. You can watch the video here to see the original challenge.

Introduction

Minesweeper is a single-player puzzle game where the player's objective is to clear a rectangular board containing hidden "mines" or bombs, without detonating any of them. The board is divided into cells, and each cell may contain a mine or a number indicating how many mines are adjacent to it. The player must strategically reveal cells and use the numerical information to deduce the locations of mines. The game is won when all non-mine cells are revealed.

How to Play

  1. Click Run Game
  2. The game will display a grid representing the game board, initially filled with hidden cells.
  3. Use the mouse to interact with the game:
    • Left-click on a cell: Reveal the cell.
    • Right-click on a cell: Flag/unflag the cell as a potential mine.
  4. The game will show the number of adjacent mines for each revealed cell. Use this information to strategize and avoid mines.
  5. Continue revealing cells and flagging potential mines until all non-mine cells are revealed or all mines are flagged.
  6. If you accidentally reveal a mine, the game ends, and you lose. But don't worry; you can always start a new game!
  7. If the game is too easy or hard, use the slider to adjust the number of mines on the board. Alternatively, enter the desired number of mines in the the textbox above the slider. Click the Reset button to begin a new game with the specified number of mines.
  8. Enjoy!

Acknowledgments

This implementation was inspired by The Coding Train's Coding Challenge #71 on Minesweeper. Special thanks to Daniel Shiffman for creating the challenge and providing the inspiration for this project.

I would also like to acknowledge Jason Storey and his YouTube videos on Assembly Definitions and building dlls externally. You can find his videos here.

Contributing

If you find any issues or have ideas for improvements, feel free to open an issue or create a pull request. Contributions are always welcome!

License & Copyright

This project is licensed under the MS-RL License.
© BlackRece 2023 (BlackRece@gmail.com)

Enjoy playing Minesweeper and happy coding! If you have any questions or need assistance, feel free to reach out.

Author: Maurice Thompson-Hamilton
Contact: blackrece@gmail.com
Project Link: https://github.com/BlackRece/MineSweeper

Leave a comment

Log in with itch.io to leave a comment.