@Kite9Item
public Diagram example_1_3_FlowChart(DiagramBuilder builder) throws IOException {
ObjectBuilder checkLaundry = builder.withObjects("Check Laundry Basket").show(builder.asConnectedGlyphs("choice"));
checkLaundry.withObjects(null, "Is it empty?").show(builder.asTextLines());
checkLaundry.withObjects(new Relationship("yes", Direction.RIGHT), "All Done!").show(builder.asConnectedGlyphs());
Relationship no1 = new Relationship("no", Direction.DOWN);
ObjectBuilder loadLaundry = checkLaundry.withObjects(no1, "Load Laundry Into Machine").show(
builder.asConnectedGlyphs("action"));
loadLaundry.withObjects(null, "Ensure machine is empty first", "Add powder, close door", "Start programme")
.show(builder.asTextLines());
String finished = "Is Cycle Finished?";
ObjectBuilder isFinished = loadLaundry.withObjects(new Relationship("wait"), finished).show(
builder.asConnectedGlyphs("choice"));
ObjectBuilder waiting = isFinished.withObjects(new Relationship("no"), "Have a Coffee")
.show(builder.asConnectedGlyphs());
waiting.withObjects(new Relationship("check again"), finished).show(builder.asConnectedGlyphs());
Relationship yes = new Relationship("yes");
ObjectBuilder sunny = isFinished.withObjects(yes, "Is it Sunny?").show(builder.asConnectedGlyphs("choice"));
sunny.withObjects(new Relationship("it's fine"), "Hang on the Line").show(builder.asConnectedGlyphs("action"));
sunny.withObjects(new Relationship("it's wet"), "Hang on the Dryer").show(builder.asConnectedGlyphs("action"));
return builder.getDiagram();
}