To avoid having to write code to define a Blueprint
, I wrote a parser for a very simple text format.
A character represents the structure type, whitespace indicates free areas.
Since there’s currently only support for the M
odule Structure
, a text definition and parsing might look like this:
let bp = Blueprint::parse(
"MMMMMMMMMM\
MMMMMMMMMM\
MMMM MMMMM\
MMMMMMMMMM\
MMMMMMMMMM\
MMMMMMMMMM\
MMMMMMMMMM\
MMMMMMMMMM\
MMMMMMMMMM\
MMMMMMMMMM",
)
.unwrap();