A simple string rewrite class.
axiom |
The starting string / seed. |
rules |
Should be a dictionary in the form of (character : replacement string). |
Rewrite and go to next generation.
Reset generation counter to zero and the production to the axiom.
Change the rules during the game - not recommended.
dict |
A dictionary in the form of (character : replacement string). |
Convert nested production array into a single string.
Starting string.
A dictionary in the form of (character : replacement array of characters).
The current production as a nested array.
A counter.