Nightpanda / nonogram

Produces the japanese nonogram image brain puzzle from pixel data. Pixel data is a given image, represented whether a pixel is existent 1 or non existent. Pixel data is an array of array depicting the picture.
Eclipse Public License 1.0
0 stars 0 forks source link

nonogram

Creates nonogram number coloring puzzles from images or at random.

Example of a nonogram created.

Usage

lein run first-argument second-argument third-argument last-argument
lein run "face.png" 16
lein run "face.png" "draw" 16 
lein run "face.png" "{:0 Z :1 @}" 16 
lein run "random" 16
lein run "random" "draw" 16
lein run "random" "draw" "{:0 Z :1 @}" 16

Examples

Also useful with $lein repl

Then you can use the methods directly, like (random-nonogram size) where size is the integer number for the size of the random image to be created and turned into a nonogram.

You can also create nonogram from huge images with (image-nonogram path), but be warned, it takes a while and the end result is really confusing to view from a terminal.

You can also view the art once you have created it with (print-art)

For larger nonograms, you can't see the end result clearly so I suggest throwing the result to a file and then viewing it in an editor that has better viewing capabilities.

$ lein run ./image-path 64 > resulting-nonogram.txt

Bugs

Odd inputs can result in odd exceptions.

TODO

License

Copyright © 2017 FIXME

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.