by @Ibrahim Mahboob Fork
{"functions":[],"name":"darts","main":{"rawId":"main","tpe":"Void","name":"main","statements":[{"@type":"Begin","id":"id_8a369190_2985_4e0d_ae7b_842877fdcb28"},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Integer","name":"points","lengthValue2":"5","id":"id_b566c964_c772_40b3_978d_8f62ffb395a7","initValue":"101"},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Integer","name":"score","lengthValue2":"5","id":"id_dfe6840a_c14b_49ee_a5f3_c40ff8231549","initValue":null},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Integer","name":"tries","lengthValue2":"5","id":"id_326c4488_d347_4cf1_808c_4544ecac362a","initValue":"1"},{"newline":true,"@type":"Output","id":"id_9840b522_8781_4e49_8b30_b7f2f658afba","value":"\"what score did you get on your first try?\""},{"@type":"Input","name":"score","id":"id_9afd1165_00a7_45c3_9f70_39fbae6986b1","prompt":null},{"condition":"points>=0","@type":"While","id":"id_206e4727_f5f3_47a9_b3d3_52587e7f960c","body":{"statements":[{"newline":true,"@type":"Output","id":"id_560b951c_eae0_46a1_8c4b_38d182f8b0a0","value":"\"how about now?\""},{"@type":"Input","name":"score","id":"id_cc00bcfc_90d7_48c9_b482_8a83d484ee55","prompt":null},{"@type":"Assign","name":"points","id":"id_62b0ebbc_5f4a_4faa_9285_e8a12c4b1482","value":"points-score"},{"@type":"Assign","name":"tries","id":"id_572bc09c_c32a_47c7_8780_ab49b76a8cbb","value":"tries+1"},{"newline":true,"@type":"Output","id":"id_99c926e3_af1a_4942_b781_36e6f9570ffc","value":"\"not bad, try again you have attempted \" + tries + \"tries\""}],"id":"id_e1d665bb_79c1_47db_bbdd_2d3729b861de"}},{"newline":true,"@type":"Output","id":"id_2a4186ad_a17a_4089_a183_bc8d9b3f6e89","value":"\"well done, you managed to beat the game in \" + tries + \" tries\""},{"@type":"Return","id":"id_99df6ae9_3ed6_40cf_b410_a65857bd6150","maybeValue":null}],"parameters":[]},"id":"id_bbbb56bf_5a53_4cf0_95ad_ddf3e6236b7d","config":{"showDebugVars":true,"useInputPrompt":false,"echoEnteredValue":false,"showIoBtns":true,"showFunctions":false,"lang":"java","showGenCode":false},"version":"0.3","revision":392}