swichers / php-quickfort-parser
Parser for QuickFort blueprint files.
1.0.0
2019-07-26 08:11 UTC
Requires
- php: >=7.1
Requires (Dev)
- codacy/coverage: dev-master
- phpunit/phpunit: ^6.5
- squizlabs/php_codesniffer: ^3.4
This package is auto-updated.
Last update: 2025-08-04 06:31:05 UTC
README
This is a simple library for parsing basic QuickFort blueprints. Only dig blueprints are implemented. There are no plans to actively work on this project, but pull requests for new features and layer types will be accepted.
Example
Usage
<?php declare(strict_types=1); use QuickFort\Parser\Dig; $blueprint = <<<BLUEPRINT_END #dig A simple dig blueprint d,~,~,# d,d,d,# ~,~,d,# #,#,#,# BLUEPRINT_END; $parser = new Dig(); $parser->setBlueprint($blueprint); $layers = $parser->getLayers();
Result
[
['d'],
['d', 'd', 'd'],
[2 => 'd'],
[],
]
Not implemented
- Build layer
- Place layer
- Query layer
Links
- Dwarf Fortress http://www.bay12games.com/dwarves/
- QuickFort http://www.joelpt.net/quickfort/
- QuickFort (GitHub) https://github.com/joelpt/quickfort
###*:::=####*:*############################
=++##*******++++
+++++++++*#++
-+++++++*++
-#####**#+
...... -##*+*#+#*
.:=====+--===.. :-#*+*#*#*
. := .*###*+#+
:= .#######
:= =#*++*
:= @@@%: -+####
-##@@@@@@: -++++*
-##@####. =####+
-###@@@%-. =###++
-######%@: =###+*
-#####%%@-. =*##+*
-####%%@@@#+. .=***#++
-######@@@@%=. .***#*++
-##=:::-#=---. +#**++**
.=#*.. .*#- -*########
.+##**. .*##+..+**#####*+##
#-.:-+###.*################################
###########################################