An open API service indexing awesome lists of open source software.

https://github.com/sondregj/hitori

🗻 Solver for Hitori Puzzles
https://github.com/sondregj/hitori

functional hitori hitori-solver typescript

Last synced: 7 days ago
JSON representation

🗻 Solver for Hitori Puzzles

Awesome Lists containing this project

README

        


🧩




Hitori

A Hitori puzzle solver



Travis Build Status


npm (latest)


npm bundle size


GitHub contributors


License


Gitmoji

A simple Hitori solver, implemented with TypeScript.

## Usage

```javascript
import { HitoriBoard, solve } from 'hitori'

const board = HitoriBoard.from2DArray([
[1, 4, 2, 5, 3],
[4, 3, 1, 4, 6],
[3, 5, 5, 3, 5],
[4, 2, 4, 6, 1],
[6, 4, 2, 1, 2],
])

const [solved, iterations] = solve({ board })
```

The solver function returns an array with the final solution, if found, and an array of all the intermediate iterations.

## License

MIT © 2019 Sondre Gjellestad