Crate takuzu [−] [src]
A Takuzu (a.k.a. Binairo) solving library.
If you are looking for a binary, see tackle for an example of implementation.
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 of either number adjacent to each other in one direction.
- each row and each column should contain an equal number of
0
s and1
s. - no two rows and no two columns can be 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 the valid solutions though.
Format
The grid should be represented with the following characters:
0
, 1
, .
for a missing number and one \n
at the end of each row.
(The final \n
can be omitted though.)
Sources
Check out the repository.
Structs
Grid |
A container for takuzu grid manipulation. |
Enums
GridError |
An error returned when checking if the grid is well-sized and legal. |
GridParseError |
An error returned when parsing a string to create a grid failed. |
SourceError |
An error returned by the |
Traits
Source |
The |
Type Definitions
Array |
A raw takuzu grid representation. |