by @Kayden Maselskas Fork
{"functions":[],"name":"Darts!","main":{"rawId":"main","tpe":"Void","name":"main","statements":[{"@type":"Begin","id":"id_0c42815f_7e1b_4c36_9fcc_b4833ba9d7e0"},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Integer","name":"TotalPoints","lengthValue2":"5","id":"id_91427800_82e3_4759_86ed_d6a1549ca54d","initValue":"101"},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Integer","name":"Points","lengthValue2":"5","id":"id_9019596a_8b98_4c43_95b3_a58db88cd814","initValue":null},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Integer","name":"Darts","lengthValue2":"5","id":"id_c155ccdd_cf4f_46ff_a89a_b45d1022dda1","initValue":"1"},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"String","name":"Answer","lengthValue2":"5","id":"id_8bd9b1cf_1282_4775_a0b0_be6ad5dbb5a9","initValue":null},{"newline":true,"@type":"Output","id":"id_a9cec1ff_d2a0_46f7_8ed7_dd78ad0c7fac","value":"\"This is a game of darts, every time you throw a dart you will get a random amount of points!\""},{"newline":true,"@type":"Output","id":"id_927fc586_72c6_4337_ba5d_d7bedfcc9479","value":"\"Would you like to throw a dart?\""},{"@type":"Input","name":"Answer","id":"id_8f0ba215_9857_4cd4_8fc6_9bb29efa7753","prompt":null},{"condition":"(Answer == \"yes\" || Answer == \"ye\" || Answer == \"Yes\" || Answer == \"Ye\") && TotalPoints > 0","@type":"While","id":"id_119a14ca_e2f8_4cf4_a553_b0b9ff78ab1e","body":{"statements":[{"@type":"Assign","name":"Points","id":"id_1aed6497_c4dd_4474_9000_5ae0cf688497","value":"randomInt(50)"},{"@type":"Assign","name":"TotalPoints","id":"id_d6106549_fdba_4bc8_897b_04bc0e72b8d8","value":"TotalPoints - Points"},{"@type":"Assign","name":"Darts","id":"id_3729010b_325a_4c0d_9cd0_d1870c8ba360","value":"Darts + 1"},{"falseBlock":{"statements":[],"id":"id_df2a39e0_e9ae_4ffd_b9b0_6b62ebbd6714"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_cf04c813_0d02_41a8_88d6_f2119d985799","value":"\"You got \" + Points + \" points!\" + \" You now have \" + TotalPoints + \" points!\""},{"newline":true,"@type":"Output","id":"id_d7d91efc_1bb9_43f9_be39_4718db3b0610","value":"\"Would you like to throw another dart?\""},{"@type":"Input","name":"Answer","id":"id_63032014_1d87_407e_98c1_b78bfc086df7","prompt":null}],"id":"id_059abfb8_38b1_420f_9c42_211ff99f864e"},"condition":"TotalPoints >= 0","@type":"If","id":"id_d5988b44_ddd9_4e51_a6e2_5958aa7f86c1"}],"id":"id_40cd0baa_ad58_405e_b190_ac609d871d75"}},{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_034ba178_dee1_44b7_81a5_e0723581ea3f","value":"\"You didn't type (yes) so I must guess that you gave up!\""}],"id":"id_f7dbbad9_320c_4224_8c1d_403a286bf516"},"trueBlock":{"statements":[{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_a98de6c6_cf52_477d_912f_5c7ee8a9434d","value":"\"You threw another dart and got \" + TotalPoints + \" which is under zero so you technically won! You threw a total of \" + Darts + \" darts\""}],"id":"id_d3b7bd4a_c755_40a8_9d7e_77decc376b07"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_21fb6a6c_39cb_4913_b409_0b05947b78c4","value":"\"You threw another dart and got \" + TotalPoints + \" which is exactly zero so you won! You threw a total of \" + Darts + \" darts\""},{"newline":true,"@type":"Output","id":"id_46779ad7_0287_4d66_ba58_34e2e3b7016d","value":"\"CONGRATULATIONS ON GETTING EXACTLY 0!\""}],"id":"id_43747df9_6412_4828_9468_56a7db3d52c5"},"condition":"TotalPoints == 0","@type":"If","id":"id_e25794f5_90fe_4a5a_a368_521074d3f4a3"}],"id":"id_33918645_6963_4514_bae3_9be15f30a118"},"condition":"TotalPoints <= 0","@type":"If","id":"id_9694f2cc_d122_49d7_93ea_1cd52e660d4d"},{"@type":"Return","id":"id_312fe8da_00e1_4676_ac84_71f7171a0914","maybeValue":null}],"parameters":[]},"id":"id_f0427ba8_471e_417d_9054_4bcd5dbb68e7","config":{"showDebugVars":true,"useInputPrompt":false,"echoEnteredValue":false,"showIoBtns":true,"showFunctions":false,"lang":"python","showGenCode":true},"version":"0.3","revision":2044}