Open
Description
Example 8.8 (Simple L-system Sentence Generation) has a minor bug. Generation 0 should be the axiom (i.e., "A"). But the code skips this, and shows generations with their numbers off by one. (Figure 8.20 is correct.)
The easiest way to fix this is probably to skip calling generate()
when i is 0:
for (let i = 0; i < 9; i++) {
if (i > 0) generate();
I don't know if this needs explanation in the text or not.
Metadata
Metadata
Assignees
Labels
No labels