stateDiagram state MENU { WAIT WAIT : WAIT WAIT : do / #123; wait_count++#59; #125; state BEVERAGE { WATER WATER : WATER WATER : 1. do / #123; water_count++#59; #125; } %% Initial state name as "." so that it fits in black circle shape. %% See https://github.com/StateSmith/StateSmith/issues/404 state "." as MENU.(InitialState) } %% Initial state name as "." so that it fits in black circle shape. %% See https://github.com/StateSmith/StateSmith/issues/404 state "." as ROOT.(InitialState) WAIT --> WATER : 1. do [wait_count > X] WATER --> WAIT : do [water_count > Y] MENU.(InitialState) --> WAIT ROOT.(InitialState) --> MENU