by @Jaseem Malik Fork
{"functions":[],"name":"New Program","main":{"rawId":"main","tpe":"Void","name":"main","statements":[{"@type":"Begin","id":"id_ca2f453c_47cf_44e5_91dd_9168376ac274"},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"String","name":"player1Choice","lengthValue2":"5","id":"id_1eb867b1_a860_4d40_8495_7ceb1792de2f","initValue":null},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"String","name":"player2Choice","lengthValue2":"5","id":"id_f6312033_99bc_4f3d_8b1b_ed2e97597cd5","initValue":null},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Integer","name":"round","lengthValue2":"5","id":"id_da2bdbd4_eef4_4080_9698_0d2de68ea4e7","initValue":"1"},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Integer","name":"maxRound","lengthValue2":"5","id":"id_cbf3c123_11e7_4a46_8be5_e1f4d7b66f98","initValue":"3"},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Integer","name":"player1Score","lengthValue2":"5","id":"id_c46ac787_4e07_4ab5_968a_3d8ded6ea9e9","initValue":"0"},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Integer","name":"player2Score","lengthValue2":"5","id":"id_ad1fcdae_b347_4e93_af49_16b582282cdc","initValue":"0"},{"condition":"round<=maxRound","@type":"While","id":"id_b3c8e710_9318_4e91_afab_676d80d4daa4","body":{"statements":[{"@type":"Input","name":"player1Choice","id":"id_0a90dd67_21a4_43e2_a494_b459eea57242","prompt":null},{"newline":true,"@type":"Output","id":"id_fac46af0_148d_4403_b8f0_ebd7df7f6659","value":"\"You Have To Choose From Rock,Paper,Scissor,Lizard,Spock\""},{"@type":"Input","name":"player2Choice","id":"id_a91dc1ad_d5c0_4e94_996a_02b3e2c46d65","prompt":null},{"newline":true,"@type":"Output","id":"id_1e773c23_9ba8_4f6f_afcb_30264d7fbb61","value":"\"You Have To Choose From Rock,Paper,Scissor,Lizard,Spock\""},{"@type":"Assign","name":"round","id":"id_90469866_019f_406d_950d_d48bacb84051","value":"round+1"},{"falseBlock":{"statements":[{"falseBlock":{"statements":[{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_63d067cf_f4eb_4d37_a056_678143290693","value":"\"Invalid input! Please type correctly.\""}],"id":"id_803eaa36_ff06_42ac_8afe_e166913e1cff"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_32382353_e2fd_4d48_8c9a_62faffd755c3","value":"\"It's a Draw! No points added.\""}],"id":"id_453e0d02_d972_4c74_b25b_b0bc34bf73bc"},"condition":"player1Choice == player2Choice","@type":"If","id":"id_9b89645d_3d18_4ea9_882c_7515307632b3"}],"id":"id_722a8655_cf6d_4a17_b069_2411be9cae1f"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_380c9efc_35b8_45b3_8b96_c32b74a243a5","value":"\"player2win!\""},{"@type":"Assign","name":"player2Score","id":"id_6d3ba176_29ca_45cc_80d4_ded0aded95fb","value":"player2Score+1"}],"id":"id_eb2a38d6_3f1b_4c8a_8714_34931569eb53"},"condition":"(player1Choice != player2Choice) && ((player2Choice == \"Rock\" && (player1Choice == \"Scissors\" || player1Choice == \"Lizard\")) || (player2Choice == \"Paper\" && (player1Choice == \"Rock\" || player1Choice == \"Spock\")) || (player2Choice == \"Scissors\" && (player1Choice == \"Paper\" || player1Choice == \"Lizard\")) || (player2Choice == \"Lizard\" && (player1Choice == \"Paper\" || player1Choice == \"Spock\")) || (player2Choice == \"Spock\" && (player1Choice == \"Scissors\" || player1Choice == \"Rock\")))","@type":"If","id":"id_db3e21b2_8aba_41c0_996c_a91ec0896120"}],"id":"id_4d6bf0db_1afd_4b40_8055_09ea6b4fcfa5"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_0080dc5a_c21d_44b7_ab68_2aa2be4c8af7","value":"\"player1wins!\""},{"@type":"Assign","name":"player1Score","id":"id_d4067c1d_e89d_4c34_9db9_61e319475430","value":"player1Score+1"}],"id":"id_520cb8ab_1c4e_4feb_9f66_b47ec1434978"},"condition":"(player1Choice != player2Choice) && ((player1Choice == \"Rock\" && (player2Choice == \"Scissors\" || player2Choice == \"Lizard\")) || (player1Choice == \"Paper\" && (player2Choice == \"Rock\" || player2Choice == \"Spock\")) || (player1Choice == \"Scissors\" && (player2Choice == \"Paper\" || player2Choice == \"Lizard\")) || (player1Choice == \"Lizard\" && (player2Choice == \"Paper\" || player2Choice == \"Spock\")) || (player1Choice == \"Spock\" && (player2Choice == \"Scissors\" || player2Choice == \"Rock\")))","@type":"If","id":"id_a026b6a1_3848_4cf5_b128_504ebfd8e4a5"}],"id":"id_5856904f_b48d_469e_bc7f_45389cb86ae7"}},{"newline":true,"@type":"Output","id":"id_623d038d_6cdf_4cee_93bd_68c81ee60aea","value":"\"Game Over! Player 1 Score: \"+ player1Score + \"Player 2 Score: \"+ player2Score"},{"falseBlock":{"statements":[{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_fc35d70b_6c39_4c89_88a4_4af5711d20b5","value":"\"Match is Tie! Both players scored equal points \""}],"id":"id_f3922f9f_4aa1_4dc3_ba04_bf9968707002"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_af3d096d_7655_477b_963a_1e6e2af7a915","value":"\"Player 2 Win\""}],"id":"id_1b1c9a31_1e46_4806_9106_210db2a23dd5"},"condition":"player2Score>player1Score","@type":"If","id":"id_0cc552cb_479f_404c_91e7_8b19931d99a4"}],"id":"id_4773e907_14fa_40c2_8232_0d399edd96a5"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_647ec00d_1e21_4325_bb4f_78f44c9bda7f","value":"\"Player 1 Win\""}],"id":"id_f084a048_6275_46bd_b52b_69d05aed5e1d"},"condition":"player1Score>player2Score","@type":"If","id":"id_960ba5c2_7e03_46a9_9fdb_1ccaa1ed13df"},{"@type":"Return","id":"id_08fc2987_d53a_4d09_81c9_17f9201c1b4b","maybeValue":null}],"parameters":[]},"id":"id_d335d007_48ae_44f3_ac40_78db2e24e258","config":{"showDebugVars":true,"useInputPrompt":false,"echoEnteredValue":false,"showIoBtns":true,"showFunctions":false,"lang":"javascript","showGenCode":true},"version":"0.3","revision":911}