@sudokupad/penpa-to-scl
v0.0.1-preview.2
Published
Convert Penpa+ puzzle to SodukuPad scl puzzle format
Downloads
8
Readme
Convert Penpa+ puzzle to SodukuPad scl puzzle format
The @sudokupad/penpa-to-scl
package converts a Penpa+ puzzle URL into a SudokuPad's scl puzzle format object.
Usage
Run npm install @sudokupad/penpa-to-scl
to install the converter.
Example
import { PenpaToSclConverter } from '@sudokupad/penpa-to-scl';
// Convert with default flag values
let penpaConverter = new PenpaToSclConverter();
let sclPuzzle = penpaConverter.convertPenpaToScl(penpaUrl);
Example with converter flags
import { PenpaConverterFlags, PenpaToSclConverter } from '@sudokupad/penpa-to-scl';
// Create converter flags
let converterFlags = new PenpaConverterFlags();
converterFlags.setValue('thickLines', false);
converterFlags.setValue('debug', true);
let flags = converterFlags.getFlagValues();
// Convert with flags
let penpaConverter = new PenpaToSclConverter(flags);
let sclPuzzle = penpaConverter.convertPenpaToScl(penpaUrl);