Procedurally generate siege engines.
This library allows you to procedurally generate new siege engines using a template. This template can be defined in code or from as an ASCII string.
The ascii
example can be used to showcase this:
example.ascii
contains the following text:
+-------+ |.......| |.......| |.......| |.......+----+ |.......| |.......| |.......| o---o---o
When we run the example from the command line:
cargo run --example ascii src/example.ascii -w 7 -h 10
We might get this as an output:
+--+ |..| |..| |..+--+ |..| |..| o--o
The '*'
symbol can be used to let the algorithm automatically choose what edges to use:
cargo run --example ascii src/example2.ascii -w 20 -h 10
example2.ascii
:
**** **** **** ********* ********* *********--- ********* ********* o***o***o
Might result in:
+--+ |..| +--+ |..+--+ |..| |.....| |..| |.....+------- |..+--+.....| |...........| |...........| |...........| o-----------o