Fast, Flexible, Fabulous. Minesweeper analyzing Java library
This library makes it easy to analyze mine probabilities and probabilities for all different numbers on a Minesweeper board. There are abstractions available so that all you need to do is implement an interface that can tell if a specific field is clicked or not, what number is revealed, or if a mine is revealed.
The library takes care of the rest.
The details of how the library work can be found on the wiki
- Create a new class that extends AbstractAnalyze
- Implement the missing methods
- Create an instance of that class
- call the
createRules
method on your instance - call the
solve
method and store the result
To also find the detailed probabilities:
- On the
AnalyzeResult
object you got in the last step, callanalyzeDetailed
and pass the instance of the class you created in step 1 to that method.
Add a repository definition like this in your pom:
<repositories>
<repository>
<id>zomis</id>
<name>Zomis' Maven Repository</name>
<url>http://www.zomis.net/maven/</url>
</repository>
</repositories>
Add this dependency in your pom:
<dependency>
<groupId>net.zomis</groupId>
<artifactId>mine-analyze</artifactId>
<version>1.0</version>
</dependency>