Full source code ⋅ Previous chapter ⋅ Next chapter
Previously we were printing out ASCII characters one by one immediately. This is fine, however you have more control and code look cleaner if you prepare a line before displaying it.
In our case (since we are using Depth behaviour) indentation is a List of Units.
For each indentation level we need to print out two Space characters:
Everything is ready to print an individial line - indentation level, task status and task text: