This project implements a text-based MineSweeper game in Java. The game allows the player to uncover cells on a minefield and avoid hitting mines. The project utilizes object-oriented programming principles and includes features such as randomly placing mines, uncovering adjacent cells, and checking for a win or loss condition.
To run the MineSweeper game, follow these steps:
-
Prerequisites:
-
Clone the Repository:
git clone https://github.com/besteceltek/MineSweeper.git
-
Navigate to the Project Directory:
cd MineSweeper -
Compile the Java Files:
javac *.java -
Run the Game:
java Main
-
Play the Game:
- Follow the on-screen prompts to enter the number of rows and columns and play the game.
- Java
- Git (for version control)
- The project includes two main classes: MineSweeper and Main.
- The MineSweeper class encapsulates the game logic and methods.
- The Main class is responsible for taking user input and starting the game.
- The game initializes with a minefield, and the player uncovers cells to avoid hitting mines.
- If the player uncovers all non-mine cells, they win. If the player hits a mine, the game ends.
- The README.md file provides basic information and instructions for running the game.
Feel free to explore the code and make improvements or modifications as needed. If you encounter any issues or have suggestions, please open an issue in the repository.