nonogramy

Typescript library for solving nonogram puzzles

Usage no npm install needed!

<script type="module">
  import nonogramy from 'https://cdn.skypack.dev/nonogramy';
</script>

README

Nonogramy npm version

Simple library for solving nonograms.

Install

npm install nonogramy

Use

var nonogramy = require('nonogramy');
var nonogram = new nonogramy.Nonogram(5);
nonogram.rowConstraints = [[1], [3], [5], [3], [1]];
nonogram.colConstraints = [[1], [3], [5], [3], [1]];
var solver = new nonogramy.NonogramSolver();
var solvedNonogram = solver.solve(nonogram);
console.log(solvedNonogram.matrix);