pierrelemee / mots-fleches-parser
MFL file parser
2.0.1
2019-11-17 17:05 UTC
Requires
- php: >=7.1
- ext-json: *
Requires (Dev)
- phpunit/phpunit: 5.5.4
This package is auto-updated.
Last update: 2024-12-26 06:23:57 UTC
README
mots-fleches-parser
A simple but handy library to help you parse mots fléchés files, in MFL or MFJ format.
Example:
use PierreLemee\MotsFleches\GridParser; $parser = new GridParser(); $grid = $parser->parseFile($file = __DIR__ . '/tests/PierreLemee/MflParser/grids/grid_ok.mfj'); echo "Read grid ({$grid->getWidth()}x{$grid->getHeight()}) from file {$file}" . PHP_EOL; foreach ($grid->getWords() as $word) { echo "Definition at ({$word->getX()}:{$word->getY()}) with direction {$word->getDirection()}: {$word->getDefinition()} => {$word->getContent()}" . PHP_EOL; }
Note: for MFJ files, the node
binary is required on the system host