MineSweeper is a classic single-player puzzle game where the player attempts to clear a rectangular board containing hidden mines or bombs without detonating any of them.
- Compile and Run the Game:
- Make sure you have Java installed on your machine.
- You don't need to worry about the terminal. Just make sure you have an integrated development environment (IDE) like IntelliJ IDEA or Eclipse installed.
- Open the project in your IDE.
- Locate the
Main
class inside the project. - Run the
Main
class to start the game. - Follow the on-screen instructions to input the dimensions of the game grid and play the game.
- Java: The primary programming language used for the implementation.
- Random Class: Utilized for generating random numbers to place mines on the game grid.
- Scanner Class: Used for taking user input during the game.
- The game randomly places mines on the grid, and the player must strategically uncover cells without hitting a mine.
- The number displayed in each uncovered cell indicates the count of mines in adjacent cells.
- The game ends if the player uncovers a cell containing a mine or successfully reveals all safe cells.
Feel free to explore and modify the code to enhance or customize the game further. If you have any questions or suggestions, please don't hesitate to reach out!
Enjoy playing MineSweeper!