{ "specification": { "phases": [ { "label": "START", "options": [ { "OptionForParameters": { "question": { "NumberQuestion": { "parameter": "random", "min": -1000, "max": 1000, "stepsize": 1 } }, "param": { "values": { } }, "stimulus": { "Textual": { "question": "Please enter a random number between 0 and 9." } } } }, { "OptionForParameters": { "question": { "NumberQuestion": { "parameter": "random", "min": -1000, "max": 1000, "stepsize": 1 } }, "param": { "values": { } }, "stimulus": { "Textual": { "question": "Can you give a random number, at least 0 and at most 9." } } } } ], "next": { "gotoif": [ { "label": "goodnum", "condition": { "values": { "random": { "num": 4.5 } } } }, { "label": "badnum", "condition": { "values": { "random": { "num": -4.5 } } } }, { "label": "badnum", "condition": { "values": { "random": { "num": 13.5 } } } } ] } }, { "label": "goodnum", "options": [ { "OptionForParameters": { "question": { "Bool": { "parameter": "retry" } }, "param": { "values": { } }, "stimulus": { "Textual": { "question": "Yes, [random] is between 0 and 9. Do you want to retry?" } } } }, { "OptionForParameters": { "question": { "Bool": { "parameter": "retry" } }, "param": { "values": { } }, "stimulus": { "Textual": { "question": "[random] is correct. Try again??" } } } } ], "next": { "gotoif": [ { "label": "END", "condition": { "values": { "retry": { "bool": false } } } }, { "label": "START", "condition": { "values": { "retry": { "bool": true } } } } ] } }, { "label": "badnum", "options": [ { "OptionForParameters": { "question": { "Bool": { "parameter": "retry" } }, "param": { "values": { } }, "stimulus": { "Textual": { "question": "Nah, [random] is outside 0 to 9. Do you want to retry?" } } } }, { "OptionForParameters": { "question": { "Bool": { "parameter": "retry" } }, "param": { "values": { } }, "stimulus": { "Textual": { "question": "That was not a correct answer. Try again??" } } } } ], "next": { "gotoif": [ { "label": "END", "condition": { "values": { "retry": { "bool": false } } } }, { "label": "START", "condition": { "values": { "retry": { "bool": true } } } } ] } } ] }, "parameters": { "values": { "dialog.PhaseLabel": { "txt": "START" } } } }