by @Zaiyan Khan Fork
{"functions":[],"name":"Darts","main":{"rawId":"main","tpe":"Void","name":"main","statements":[{"@type":"Begin","id":"id_7c86a79b_6c91_4313_9358_6df32dc39aed"},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Integer","name":"total","lengthValue2":"5","id":"id_ab56581b_1a51_42fa_9cbd_7270e467e177","initValue":"0"},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Integer","name":"attempts","lengthValue2":"5","id":"id_d5f5084d_7d7c_49bd_8cda_5a54916d3460","initValue":"0"},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Integer","name":"score","lengthValue2":"5","id":"id_b52a4de4_5852_4ba7_ad8c_ba9d76b90882","initValue":"101"},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Integer","name":"points","lengthValue2":"5","id":"id_0f080c15_1f46_412e_9f20_cefb4e4bc681","initValue":null},{"condition":"score>0","@type":"While","id":"id_d3b31090_104e_46d0_9b8c_4aa0420bf427","body":{"statements":[{"newline":true,"@type":"Output","id":"id_47901290_2bfa_4cb5_b5f7_6e4ee6c37b6f","value":"\"Enter the score you just got by throwing the dart\""},{"@type":"Input","name":"points","id":"id_58e15f2a_b4ce_4a57_a613_e2550e678415","prompt":null},{"@type":"Assign","name":"attempts","id":"id_03c98ad7_51af_48c7_b39d_5d9f9786fa37","value":"attempts + 1"},{"@type":"Assign","name":"score","id":"id_e44709e1_fab0_4244_958a_b3cb92dc1d3a","value":"score - points"},{"@type":"Assign","name":"total","id":"id_dad9ffb0_aa43_4dd5_8f47_db3b8d59e864","value":"total + points"},{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_3c17d17b_5d20_4099_a981_eafb121ab73a","value":"\"Well done for reaching your target, your total score is \" + total"}],"id":"id_d3750f2d_a353_4d2b_99a4_51d63fd7f66a"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_f55fdd6d_b083_458e_bde4_4f41fe92c8b0","value":"\"Your total is: \" + total + \", Your current target left is \" + score"}],"id":"id_fbebc60f_8dd1_4acb_9291_60ac5a7975fd"},"condition":"score>0","@type":"If","id":"id_4da316bf_0101_48a5_8620_a9dd1f769e7d"}],"id":"id_4540409e_b3a2_4df1_a266_076bcac0bb65"}},{"newline":true,"@type":"Output","id":"id_2f369514_3828_40af_a0cd_2b5babb021e8","value":"\"You took \" + attempts + \" attempts \""},{"@type":"Return","id":"id_173a1a95_4311_4082_88a6_1328fceff530","maybeValue":null}],"parameters":[]},"id":"id_6d31f261_f58e_452a_8fda_324c2b3801db","config":{"showDebugVars":true,"useInputPrompt":false,"echoEnteredValue":false,"showIoBtns":true,"showFunctions":false,"lang":"java","showGenCode":false},"version":"0.3","revision":477}