15 releases (4 stable)
1.1.1 | Mar 31, 2021 |
---|---|
1.0.1 | Jul 22, 2020 |
0.6.0 | Jan 25, 2017 |
0.5.1 | Dec 7, 2016 |
0.3.2 | Nov 29, 2015 |
#928 in Math
26 downloads per month
130KB
687 lines
Takuzu
A library and a binary for solving Takuzu (a.k.a. Binairo) number puzzles.
Documentation
See the documentation and the example grids.
Usage
To use the solver:
cargo install takuzu
takuzu [FILE]...
lib.rs
:
A library for solving Takuzu (a.k.a. Binairo) number puzzles.
About
Takuzu is a number puzzle, sometimes called binary sudoku.
The objective is to fill a grid with 0
s and 1
s while
observing the following rules:
- no more than two zeros or two ones adjacent to each other in any direction.
- each row and each column must contain an equal number of
0
s and1
s. - no two rows and no two columns are the same.
The grids are squares of even size. A valid grid must have one and only one solution. The solver will find and return all valid solutions though.
Input format
For parsing, the grids must be represented with the following characters:
0
, 1
, .
for a missing number, and one \n
at the end of each row.
The final \n
may be omitted.