convert_puzzle_string_to_puzzle: Convert between nonogram puzzle strings and puzzles

Description Usage Arguments Details

Description

A 'puzzle string' is a compact text representation of a nonogram puzzle, whereas a 'puzzle' is an R list object representing the puzzle.

Usage

1
2
3

Arguments

puzzle_string

compact string representation of a puzzle

puzzle

R list representation of a puzzle

Details

A puzzle is a list containing:

A clue is a list of integers which is the run-length encoding of just the filled spaces in the final puzzle.

e.g. list(row_clues = list(2L, 2:1, c(1L, 1L), 3L, c(1L, 1L), c(1L, 1L), 2L, c(1L, 1L), 1:2, 2L), col_clues = list(2:1, c(2L, 1L, 3L), 7L, c(1L, 3L), 2:1))

A puzzle string is a just a compact string representation of the puzzle. It consists of:

e.g. "2:2,1:1,1:3:1,1:1,1:2:1,1:1,2:2-2,1:2,1,3:7:1,3:2,1"


coolbutuseless/nonogram documentation built on May 5, 2019, 3:45 a.m.