Example:Nonogram solver/Racket: Difference between revisions

Content added Content deleted
(wrestling with pictures... just follow the link)
(added text solutions)
Line 311: Line 311:


Ah... foo! Here's an external link to one I did earlier... [[http://timb.net/images/nonogram-all.png]]. Life's too short to wrestle with Rosetta Code...
Ah... foo! Here's an external link to one I did earlier... [[http://timb.net/images/nonogram-all.png]]. Life's too short to wrestle with Rosetta Code...

After changing the:
(displayln (image-render-puzzle (solve-nonogram pzl)))
to
(displayln (string-render-puzzle (solve-nonogram pzl)))
at the end of the '''main''' module part, we get the following on standard out (stderr has been redirected to '''/dev/null''')


<pre>.###....
##.#....
.###..##
..##..##
..######
#.#####.
######..
....#...
...##...
..........######....
........###.#..###..
...#..###...#....###
..###.##############
...#..#............#
..#.#.##..........##
#####..##........##.
#####...#........#..
#####..###.###.###..
########.###.###.###
....###.#...........
....##.####.#.......
....#.###.###.......
..##.####...........
.###.###.#....###...
###..##.##...#.###..
##..##.##....##.##..
....##.#.#..##.#.#..
....#.##.#...####...
....#.#.##.....##...
.....##.##..########
....##.##...##..####
....#.##.##.#...#..#
###..###.#####.....#
#.#.###.#....#....##
##..###.#....###.###
.#.###.##.########..
.####.###.########..
...#.####.##.#####..
...#.####.##...##...
....####..##...#####
...#####.###...#####
...####.#..........#
..####.##...........
..###.###...........
....................#####
..##..............###..##
.##..............#####..#
##.............########..
##....#####.###########..
#.#..##....#....######...
#..##.....#.......###....
##........#.............#
.##.....######.........##
..###############....####
.....##########..########
....##.#.####.###..######
........#################
........#################
.......##################
.......#...##############
.......#.#.##############
........#####...#########
.................########
..................#######

</pre>