Metadata-Version: 2.1
Name: zig-minesolver
Version: 0.1.0
Summary: Minesweeper solver in Zig
Home-page: https://github.com/LewisGaul/minesolver
Author: Lewis Gaul
Maintainer: Lewis Gaul
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Development Status :: 3 - Alpha
Description-Content-Type: text/markdown

# Minesweeper solver

A minesweeper solver written in Zig.


The following cell representations are used for input boards:
- `#` for an unclicked cell
- `<N>` where `N=0,1,2,...` is a number shown in a cell
- `.` as an alternative to `0` (since the number 0 is not normally shown)
- `*` to represent a single mine (may be a revealed mine or a flag)
- `*<N>` where `N=1,2,...` is the number of mines


Example usage:
```
$zig-main -f example2.txt 8 2>/dev/null

Board:
# 2 # # #
# # # # #
# 3 # # #
# 2 # 4 #
# # # # #

Matrix:
1 1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 | 2
0 0 0 0 1 1 1 0 0 1 1 0 0 1 1 0 0 0 0 0 0 | 3
0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 0 1 1 1 0 0 | 2
0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 1 0 0 1 1 1 | 4
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | 8

RREF matrix:
 1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  1  1  1  0  0 |  1
 0  0  1  1  0  0  0  1  1  0  0  1  1  0  0  1  0  0  0  1  1 |  4
 0  0  0  0  1  1  1  0  0  0  0  0  0  0  0  0 -1 -1 -1  0  0 |  1
 0  0  0  0  0  0  0  0  0  1  0 -1 -1  1  0 -1  1  1  0 -1 -1 | -2
 0  0  0  0  0  0  0  0  0  0  1  1  1  0  1  1  0  0  1  1  1 |  4

Solver matrix:
 1  0  0  0  0  0  1  1 |  1
 0  1  0  0  0  1  0  0 |  4
 0  0  1  0  0  0 -1 -1 |  1
 0  0  0  1  0 -1  1  0 | -2
 0  0  0  0  1  1  0  1 |  4

Solver groups:
0: { 0, 1 }
1: { 2, 3, 7, 8 }
2: { 4, 5, 6 }
3: { 9, 13 }
4: { 10, 14 }
5: { 11, 12, 15, 19, 20 }
6: { 16, 17 }
7: { 18 }

Mine configurations:
0: { 1, 2, 1, 0, 2, 2, 0, 0 }
1: { 1, 1, 1, 1, 1, 3, 0, 0 }
2: { 1, 0, 1, 2, 0, 4, 0, 0 }
3: { 0, 1, 2, 0, 1, 3, 1, 0 }
4: { 0, 0, 2, 1, 0, 4, 1, 0 }
5: { 0, 2, 2, 0, 1, 2, 0, 1 }
6: { 0, 1, 2, 1, 0, 3, 0, 1 }

Probabilities:
0.2711 0.0000 0.2711 0.3133 0.3133
0.4859 0.4859 0.4859 0.3133 0.3133
0.2651 0.0000 0.5060 0.5494 0.5494
0.2651 0.0000 0.5060 0.0000 0.5494
0.1084 0.1084 0.2410 0.5494 0.5494
```


