hitori
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

🧩

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

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

/hitori/

    Package Sidebar

    Install

    npm i hitori

    Weekly Downloads

    0

    Version

    0.1.2

    License

    MIT

    Unpacked Size

    33.9 kB

    Total Files

    35

    Last publish

    Collaborators

    • sondregj