There aren't many Gen-Y people who hadn't played the Minesweeper game. This project is the terminal implementation of the famous minesweeper game. For now, you can play this game on a 9 * 9 grid. But the grid size can be easily be updated to a bigger grid-like 16 * 16.
Terminologies:
Keyword | Meaning |
---|---|
Unmarked cells | Cells that haven't been explored yet. |
Marked cells | Explored cells |
Safe cell | Cell that is empty / doesn't contain a mine. |
Clue | Explored free cells with 1 to 8 mines around them. Shown to help the user. |
Symbols:
. --> unmarked cell
/ --> safe cell
* --> may be a mine (marked cell)
X --> mine
1 --> clue
How to play?
- Enter the number of mines to begin the game.
- Once the game gets started, it will finish only if:
- You step on a mine. Game Over! 👎😑
- You found all the mines or explored all the safe cells. You win! 😁✌️
- Safe cells: Cells that don't contain a mine.
- At each step in the game. The game asks you to either mark/unmark a cell as mine (you think a mine can be present here.) or;
- Claim a cell as free.
- If a cell that you claimed as free contains a mine. Then the game is over!
- Otherwise, the game will continue until you find all the mines in the grid or explore all the safe cells.
From IDE:
- Download the project.
- Unzip it.
- Open the project in an IDE like IntelliJ IDEA, Microsoft Visual Studio or Eclipse.
- Build the project.
- Run the main file.
From terminal:
- Open the project directory on terminal/command prompt.
- Use the javac Main.java command to compile the project.
- Use the java Main command to run the game.
Note: You need to have Java on your system to run this game.