A simple, feature-rich Minesweeper CLI game written in Java.
Note:
This README was AI-generated, cause I'm too lazy KEKW.
- Fully Interactive Terminal UI: Move with arrow keys, reveal cells, and flag mines using your keyboard.
- Customizable Board Size and Mine Count: Choose your preferred grid size and number of mines before each game.
- Colorful Display: Uses Jansi and JLine for colored output and smooth terminal control.
- Classic Minesweeper Mechanics: Automatic flood-fill for empty spaces, accurate flagging, and win/lose detection.
- Performance: Optimized rendering for a responsive experience even on large boards.
Key | Action |
---|---|
Arrow Keys | Move cursor |
z |
Reveal (open) cell |
x |
Flag or unflag a cell |
You can add dependencies via Maven or Gradle, or download jars manually.
-
Clone the repository:
git clone https://github.com/ZayrexDev/Minesweeper.git cd Minesweeper
-
Compile and run:
javac -cp "path/to/jansi.jar:path/to/jline.jar" Main.java java -cp ".:path/to/jansi.jar:path/to/jline.jar" Main
Replace
path/to/jansi.jar
andpath/to/jline.jar
with the actual paths to the Jansi and JLine jar files. -
Follow the on-screen prompts to set your board size and mine count, then play!
This project is licensed under the MIT License.