java_ms is a CLI-based Minesweeper and solver written in Java.
Additionally, there is Docker support and unit tests utilizing JUnit.
Suggest using built-in means like
brew
orapt-get
to avoid human error.
- OpenJDK (verified working with 7 & 8) - http://openjdk.java.net/install/
- (optional) JUnit - https://github.com/junit-team/junit4/wiki/Download-and-Install
- (optional) Docker - https://docs.docker.com/engine/getstarted/
From the repo directory:
javac MineSweeper.java
java MineSweeper
An automatic way to solve Minesweeper. The current thought process is the following:
- Identify all safe moves and mines based on immediate neighbors
- Identify all safe moves based on known mines
- Identify all safe moves by using neighbors' info
- Identify least risky move
- Blind click if no other options are found
The pass rate is a little above 90% (100,000 iterations) currently.