Java Mine Field Game is a text-based, strategic mine-detection game implemented in Java. This game challenges players to navigate a grid full of hidden mines while avoiding detonations. Successfully uncover all safe spots to win!
This project is currently in the development phase. Features and functionality may change as the game progresses. Contributions and feedback are welcome! If you're interested in contributing, please check the How to Contribute section below. 🚀
- Interactive Gameplay: Fully text-based and runs in the console.
- Customizable Grid: Players can specify the size of the grid at the start.
- Random Mine Placement: Mines are randomly placed based on the grid size.
- Dynamic Feedback: The grid dynamically updates with the number of surrounding mines.
- Win or Lose: Avoid all mines to win, or hit one and lose the game.
-
Clone the repository:
git clone https://github.com/cihat-kose/java-mine-field-game.git cd java-mine-field-game
-
Compile the game:
javac -d bin ./src/_00_MineFieldGame/*.java
-
Run the game:
java -cp bin _00_MineFieldGame.MineField
-
Enter the grid size (rows and columns).
-
Select a cell by entering the row and column indices.
-
Avoid mines and uncover all safe cells to win!
- The game runs on a two-dimensional grid.
- Players specify the grid size (rows and columns).
- Mines are randomly placed (1/4th of total cells).
- Select a point by entering row and column numbers.
- If the selected point contains a mine, the game ends.
- If it's safe, the number of surrounding mines is displayed.
- Clear all safe cells to win.
Welcome to Mine Field Game!
Enter grid size (rows x columns): 4 4
Select a cell (row column): 2 3
Safe! 1 mine(s) nearby.
Select a cell (row column): 1 1
Oops! You hit a mine. Game Over!
Contributions are welcome!
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit your changes (
git commit -m 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a Pull Request.
This project is licensed under the MIT License.
- Cihat Köse – Initial Developer