by @Mohammad Ashaz Fork
{"functions":[],"name":"A Game of Darts","main":{"rawId":"main","tpe":"Void","name":"main","statements":[{"@type":"Begin","id":"id_314461b4_a56f_41d0_bd3b_611862b1ab17"},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Integer","name":"Darts","lengthValue2":"5","id":"id_7f5e3e53_69be_4301_acb3_63095ac2b1c5","initValue":"0"},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"String","name":"Throw","lengthValue2":"5","id":"id_caefbff3_18fc_47c3_985e_6428290ccb7a","initValue":null},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Integer","name":"Points","lengthValue2":"5","id":"id_6bba2621_4f1c_4fd2_9865_756d17faef01","initValue":"101"},{"newline":true,"@type":"Output","id":"id_0318acc8_21f5_4040_80ea_bf69dbea850d","value":"\"Throw your dart BE if you hit The Bull's Eye= -10 points OR if you hit the Outer Ring= -5 points and M if you missed= +5 points\""},{"@type":"Input","name":"Throw","id":"id_a2596f21_9dd2_42d6_a30e_e539b66c78ba","prompt":null},{"condition":"Points >= 0","@type":"While","id":"id_5ab88590_3ed5_4f86_be41_15010db11d6a","body":{"statements":[{"falseBlock":{"statements":[{"falseBlock":{"statements":[{"falseBlock":{"statements":[],"id":"id_e15cf12a_02f4_4b23_8811_c2a67da6def6"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_8ea588ce_2ac5_49d1_aea1_9b874bed0613","value":"\"Unlucky... + 5 points\""},{"@type":"Assign","name":"Points","id":"id_5c41d4cc_1bc3_454b_8b95_9bbfa1f31135","value":"Points + 5"},{"@type":"Assign","name":"Darts","id":"id_e08ea659_73d8_4966_8b35_1722683e7c6c","value":"Darts + 1"},{"newline":true,"@type":"Output","id":"id_04100d65_ab1d_44fe_84e9_533745df73ac","value":"\"Try Again \" + Points + \" Points left\""},{"falseBlock":{"statements":[],"id":"id_afdf5f7a_f5f9_4723_a2a9_10010fe9c0ee"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_aa327565_231d_4e7a_901b_86ac3a8cf446","value":"\"You have completed the game in \" + Darts + \"Darts\""}],"id":"id_b223fe4e_6962_4d1e_a36d_f3fdf3750224"},"condition":"Points >= 0","@type":"If","id":"id_97ba906d_5562_4295_8845_af18ce5a835d"}],"id":"id_88436f25_8d5e_4eca_8fb0_cd246bb7db8d"},"condition":"Throw == \"M\"","@type":"If","id":"id_fdad28ed_be50_41f0_944c_09d1d413a8f2"}],"id":"id_380d7d0e_c4ef_493b_a3b1_a1c60f73fc4d"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_9a9e94a7_695d_46f6_88f2_73030724df21","value":"\"Nice one - 5 points\""},{"@type":"Assign","name":"Points","id":"id_475ff074_d0af_4fd2_968b_de9ba9dc5831","value":"Points - 5"},{"@type":"Assign","name":"Darts","id":"id_3c813532_7107_4809_a4cd_6f90efb92ea5","value":"Dart + 1"},{"newline":true,"@type":"Output","id":"id_ea769967_c9d0_4bfb_8f9c_5a8a21304881","value":"\"Try Again \" + Points + \" Points left\""},{"falseBlock":{"statements":[],"id":"id_95f50dbd_ae14_43ac_8ef3_b81c2528f345"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_99dae2b5_a085_4a25_979d_a736ab88a1c8","value":"\"You have completed the game in \" + Darts + \"Darts\""}],"id":"id_cd82444e_91b4_4ee2_a76e_d34443a2a881"},"condition":"Points >= 0","@type":"If","id":"id_41859c8f_b588_4029_8b9a_e40f4ece1aa6"},{"@type":"Input","name":"Throw","id":"id_8ce563a9_875e_45ca_8968_497ce3d149af","prompt":null}],"id":"id_12868bfc_dfea_490b_aa62_2075db3822b6"},"condition":"Throw == \"OR\"","@type":"If","id":"id_1fbcfba2_baf1_4b6d_893f_0b9eee3c896b"}],"id":"id_e2f11733_4f86_4fe3_9db0_b55c96d9403a"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_418d7d88_5f50_4110_af6b_6005de120173","value":"\"WHAT A SHOT -10 POINTS!\""},{"@type":"Assign","name":"Points","id":"id_2da245fb_cf60_4054_b3ce_14157cdb6f40","value":"Points - 10"},{"@type":"Assign","name":"Darts","id":"id_18af0923_a99c_4222_b0f0_87bbe55d0852","value":"Darts + 1"},{"newline":true,"@type":"Output","id":"id_893df8c0_bad2_46a6_84f6_667d1df53e2b","value":"\"Try Again \" + Points + \" Points left \""},{"falseBlock":{"statements":[{"@type":"Input","name":"Throw","id":"id_2e76b41d_aec2_47a1_b009_4db349dfac3e","prompt":null}],"id":"id_fe791e4f_03c2_4cba_b443_6cc556e5da8e"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_cd5bd8a0_d32d_4bd2_956a_a6ee532bc3e0","value":"\"You have completed the game in \" + Darts + \"Darts\""}],"id":"id_931ed4f8_6b34_4442_9df9_de8741c43511"},"condition":"Points >= 0","@type":"If","id":"id_e7ff276a_4ddf_44d1_b21f_b4f5f31ff747"}],"id":"id_1ecf1f49_9b12_4b47_925f_d64190cb9bd0"},"condition":"Throw == \"BE\"","@type":"If","id":"id_3cd09cef_fda0_4ffc_85d6_4f76a402c219"}],"id":"id_935f7d3a_35c0_4af8_affd_15d2e8160f60"}},{"newline":true,"@type":"Output","id":"id_71469582_7125_44bc_85dd_bb6e9f34590a","value":"\"You have completed the game in \" + Darts + \"Darts\""},{"@type":"Return","id":"id_3a7d72bf_3d76_4ce9_aafb_a2f669d8d678","maybeValue":null}],"parameters":[]},"id":"id_f687fc26_55e3_46e9_934f_8dba735da193","config":{"showDebugVars":true,"useInputPrompt":false,"echoEnteredValue":false,"showIoBtns":true,"showFunctions":false,"lang":"java","showGenCode":false},"version":"0.3","revision":1515}