by @Valerie Portincaso Fork
{"functions":[{"rawId":"id_0ae74931_0fd7_49f9_82fc_8d538372b6cc","tpe":"Boolean","name":"validatePrimaryColor","statements":[{"@type":"Begin","id":"id_72e82705_1c43_485a_b89f_598cbb4e3a32"},{"@type":"Comment","id":"id_14f994e9_c353_43ce_a3f5_5ad4ea0e110e","text":"Check to see if the color is one of the defined primary color values"},{"falseBlock":{"statements":[{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Boolean","name":"result","lengthValue2":"5","id":"id_05708cc0_750e_406e_84dc_18da2c9686ab","initValue":"false"}],"id":"id_0f041fb4_1561_4c18_b405_014960500c24"},"trueBlock":{"statements":[{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Boolean","name":"result","lengthValue2":"5","id":"id_f300e384_08cf_4869_a44d_19f7d3c853b2","initValue":"true"}],"id":"id_434afe43_d121_4da9_8904_f9479e1c5361"},"condition":"color == \"red\" || color == \"yellow\" || color == \"blue\"","@type":"If","id":"id_426f84d0_56d6_4add_bb59_8e908f661910"},{"@type":"Return","id":"id_ee7325ef_1ce8_4b2a_bc37_c0387dbeab1f","maybeValue":"result"}],"parameters":[{"tpe":"String","name":"color","id":"220ce8c3-b91b-4cdb-94b3-708dcbcfdc78"}]},{"rawId":"id_0b81c53a_f699_483a_951f_3a7197ef3e89","tpe":"Boolean","name":"calculateSecondaryColor","statements":[{"@type":"Begin","id":"id_01661e48_9e94_4a21_8f83_2d58d7454aa6"},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Boolean","name":"color","lengthValue2":"5","id":"id_01fa6ee1_bf7f_4f22_bef8_779810107f89","initValue":"\"\""},{"@type":"Comment","id":"id_f39a319c_9dc4_47d6_ba86_650fceb2294c","text":"\"Calculate the secondary color value\""},{"falseBlock":{"statements":[{"falseBlock":{"statements":[{"falseBlock":{"statements":[],"id":"id_d9905875_3b4a_4ee9_b9ec_f7a3e31e8b53"},"trueBlock":{"statements":[{"@type":"Assign","name":"color","id":"id_aa9b7251_85b2_454c_8d89_e95f2aa2d19a","value":"\"green\""}],"id":"id_0cb6da9e_3416_4715_a046_d41b81106925"},"condition":"colorOne == \"blue\" && colorTwo == \"yellow\"","@type":"If","id":"id_7c6b63eb_38a2_40df_b8c2_80faa3282b19"}],"id":"id_b447c04f_fb62_4882_b543_9f2a4dcf42db"},"trueBlock":{"statements":[{"@type":"Assign","name":"color","id":"id_d79b6311_7f38_4697_b17d_e38c26f60713","value":"\"orange\""}],"id":"id_a4d6b0c3_78f8_4c61_840d_a4f6ef3a5ae9"},"condition":"colorOne == \"red\" && colorTwo == \"yellow\"","@type":"If","id":"id_eb8c6a4b_0912_4280_9509_59454e2dfc30"}],"id":"id_370b647d_6792_4aa2_bf31_66e4b2894473"},"trueBlock":{"statements":[{"@type":"Assign","name":"color","id":"id_3ea7f74a_7692_4995_9901_5ef2ee9695dc","value":"\"purple\""}],"id":"id_49418ef7_7954_4604_a0a4_aa01e994cfca"},"condition":"colorOne == \"red\" && colorTwo == \"blue\"","@type":"If","id":"id_a1fe4cb9_080b_40c7_81eb_ec7209886cfb"},{"@type":"Return","id":"id_70939995_7cca_4828_a948_f7ecc4f19942","maybeValue":null}],"parameters":[{"tpe":"Boolean","name":"colorOne","id":"1aaa30af-ff75-440d-bc08-0736ab56bcbf"},{"tpe":"Boolean","name":"colorTwo","id":"37088dc3-8156-4f7a-b05f-6816a6e906cb"}]}],"name":"New Program","main":{"rawId":"main","tpe":"Void","name":"main","statements":[{"@type":"Begin","id":"id_95368c7b_4b4c_44fa_8eb4_ca83c41568e6"},{"@type":"Comment","id":"id_c9942177_b8c9_4508_9b93_03c1734f2000","text":"Declare variables"},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"String","name":"primaryColorOne","lengthValue2":"5","id":"id_9cfe11cf_1c71_4c60_b109_e0aa9402c665","initValue":"\"\""},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"String","name":"primaryColorTwo","lengthValue2":"5","id":"id_d7bdb7b1_49ce_444a_9ed3_b0c4d41f9d43","initValue":"\"\""},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Boolean","name":"hasValidInput","lengthValue2":"5","id":"id_72d1f83c_f60e_4974_be05_b4c6b0df84d1","initValue":"false"},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"String","name":"secondaryColor","lengthValue2":"5","id":"id_fd7a9f3c_4c7d_46e8_99d6_2d25765afdf1","initValue":"\"\""},{"@type":"Comment","id":"id_dd2f57c4_cf92_4fe9_ac19_d652e0b9f6cd","text":"Ask the user for input"},{"newline":true,"@type":"Output","id":"id_1c1d7546_1f3f_47aa_9942_dfd89073bcec","value":"\"What is your first primary color?\""},{"@type":"Input","name":"primaryColorOne","id":"id_8775a3ff_7850_4ccf_945e_c0008592e291","prompt":null},{"newline":true,"@type":"Output","id":"id_fdb61893_26ee_44b2_b600_9a1da91bd072","value":"\"What is your second primary color?\""},{"@type":"Input","name":"primaryColorTwo","id":"id_17372944_44c7_4bdd_bdc1_bdbef4fe903b","prompt":null},{"@type":"Comment","id":"id_5cfc6100_3d74_49da_b332_1e2568a2642f","text":"Process values"},{"falseBlock":{"statements":[],"id":"id_d049547c_22e4_4964_93d2_8b1a6d4d1b4e"},"trueBlock":{"statements":[{"falseBlock":{"statements":[],"id":"id_2e2e69a6_d8a4_4ea4_9295_61af96635b8b"},"trueBlock":{"statements":[{"@type":"Assign","name":"hasValidInput","id":"id_ee0c7c6c_cbbd_4095_8c96_d364928293e6","value":"true"},{"@type":"Assign","name":"seondaryColor","id":"id_7f859bc4_8c14_46a2_b22a_62a5418c11b4","value":"calculateSecondaryColor(primaryColorOne, primaryColorTwo)"}],"id":"id_4782372e_a797_421a_acbb_166b87bd9efc"},"condition":"validatePrimaryColor(primaryColorOne) && validatePrimaryColor(primaryColorTwo)","@type":"If","id":"id_80c60c57_cbef_4547_b42c_a08a271dc89f"}],"id":"id_cfcf8e96_b2e4_4dd7_8ba3_baef16f3cac6"},"condition":"primaryColorOne != primaryColorTwo","@type":"If","id":"id_e9aa22ea_bc34_43a6_b907_e53b8296acd2"},{"@type":"Comment","id":"id_544f2e61_3d40_4df4_9681_a17d931ccd33","text":"Show output back to the user"},{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_2cbe3ab0_b063_44f4_a0d3_6eca4461443e","value":"\"You have provided an invalid color, please enter only \"red\", \"yellow\", or \"blue\"!\""}],"id":"id_eac1de88_3fc5_42e9_95e4_de7ee6599585"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_8608bbd1_14a1_4beb_9814_2e9f25aa3696","value":"\"Your seondary color is: = secondaryColor\""}],"id":"id_e15d00f7_076d_4192_b4e5_b6d8b30844c2"},"condition":"true","@type":"If","id":"id_9a0a4820_385b_49bc_b304_06da7990ad00"},{"@type":"Return","id":"id_cec67477_e61d_4eec_814d_026784d3725a","maybeValue":null}],"parameters":[]},"id":"id_9c3c8be0_b5de_484e_9ec1_a651faecf62b","config":{"showDebugVars":true,"useInputPrompt":false,"echoEnteredValue":false,"showIoBtns":true,"showFunctions":true,"lang":"java","showGenCode":false},"version":"0.3","revision":714}