{"action":"created","comment":{"url":"https://api.github.com/repos/WilliamShull/guessing_game/pulls/comments/30442193","id":30442193,"diff_hunk":"@@ -1,23 +1,40 @@\n-//This simple game tells the user what their weight would //be on the moon! Assuming they want to, of course.\n <script type=\"text/javascript\">\n \n-var earthWeight, moonWeight, init, message;\n+var start, planetChoice, earthWeight, message, planetWeight;\n \n //prompt user\n-init = prompt(\"Would you like to know how much you would weight on the moon?\");\n-\n-if(init == \"yes\") {\n-//get their weight in earth-pounds\n-earthWeight = prompt(\"How much do you weight? (in pounds)\");\n-//Convert to moon-pounds\n-moonWeight = Math.floor(earthWeight * (1/6));\n-message = \"You would weight \" + moonWeight + \" pounds on the moon!\";\n-} else {\n-message = \"Thats fine!\";\n-//It's not\n-}\n+start = prompt(\"Would you like to know how much you would weight on a different celestial body?\");\n+if (start == 'yes') {\n+  planetChoice = prompt(\"Which celestial body: Mercury, Venus, the Moon, or Mars\");\n+  earthWeight = prompt(\"How much do you weight? (in pounds)\");\n+  console.log(earthWeight);\n+    switch (planetChoice.toLowerCase()) {\n+      case 'the moon':\n+        planetWeight = Math.floor(earthWeight * (1/6));\n+        break;\n+\n+      case 'mercury':\n+        planetWeight = Math.floor(earthWeight * 0.38);\n+        break;\n+\n+      case 'venus':\n+        planetWeight = Math.floor(earthWeight * 0.91);\n+        break;\n+\n+      case 'mars':\n+        planetWeight = Math.floor(earthWeight * 0.38);\n+        break;\n+  }\n+  console.log(planetWeight);\n+\n+  message = \"You would weigh \" + planetWeight + \" pounds on \" + planetChoice + \"!\";\n+\n+\n+  } else {\n+  message = \"Thats fine!\";\n+  //It's not\n+  }\n //print out the conversion\n alert(message);\n \n-\n </script>","path":"game.html","position":55,"original_position":55,"commit_id":"1ee92967f6d106bf78f4b5c97d1676f9bd487766","original_commit_id":"1ee92967f6d106bf78f4b5c97d1676f9bd487766","user":{"login":"warmbowski","id":1071557,"avatar_url":"https://avatars.githubusercontent.com/u/1071557?v=3","gravatar_id":"","url":"https://api.github.com/users/warmbowski","html_url":"https://github.com/warmbowski","followers_url":"https://api.github.com/users/warmbowski/followers","following_url":"https://api.github.com/users/warmbowski/following{/other_user}","gists_url":"https://api.github.com/users/warmbowski/gists{/gist_id}","starred_url":"https://api.github.com/users/warmbowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/warmbowski/subscriptions","organizations_url":"https://api.github.com/users/warmbowski/orgs","repos_url":"https://api.github.com/users/warmbowski/repos","events_url":"https://api.github.com/users/warmbowski/events{/privacy}","received_events_url":"https://api.github.com/users/warmbowski/received_events","type":"User","site_admin":false},"body":"Really looks awesome!!","created_at":"2015-05-15T20:15:17Z","updated_at":"2015-05-15T20:15:17Z","html_url":"https://github.com/WilliamShull/guessing_game/pull/1#discussion_r30442193","pull_request_url":"https://api.github.com/repos/WilliamShull/guessing_game/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/WilliamShull/guessing_game/pulls/comments/30442193"},"html":{"href":"https://github.com/WilliamShull/guessing_game/pull/1#discussion_r30442193"},"pull_request":{"href":"https://api.github.com/repos/WilliamShull/guessing_game/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/WilliamShull/guessing_game/pulls/1","id":35279041,"html_url":"https://github.com/WilliamShull/guessing_game/pull/1","diff_url":"https://github.com/WilliamShull/guessing_game/pull/1.diff","patch_url":"https://github.com/WilliamShull/guessing_game/pull/1.patch","issue_url":"https://api.github.com/repos/WilliamShull/guessing_game/issues/1","number":1,"state":"closed","locked":false,"title":"Added options for other planets and created a switch statement. Also …","user":{"login":"abkruse","id":11687730,"avatar_url":"https://avatars.githubusercontent.com/u/11687730?v=3","gravatar_id":"","url":"https://api.github.com/users/abkruse","html_url":"https://github.com/abkruse","followers_url":"https://api.github.com/users/abkruse/followers","following_url":"https://api.github.com/users/abkruse/following{/other_user}","gists_url":"https://api.github.com/users/abkruse/gists{/gist_id}","starred_url":"https://api.github.com/users/abkruse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abkruse/subscriptions","organizations_url":"https://api.github.com/users/abkruse/orgs","repos_url":"https://api.github.com/users/abkruse/repos","events_url":"https://api.github.com/users/abkruse/events{/privacy}","received_events_url":"https://api.github.com/users/abkruse/received_events","type":"User","site_admin":false},"body":"…added and edited a README. Added a Switch statement.","created_at":"2015-05-12T22:51:27Z","updated_at":"2015-05-15T20:15:17Z","closed_at":"2015-05-12T23:09:18Z","merged_at":"2015-05-12T23:09:18Z","merge_commit_sha":"0ba906cc9b0325e6e2afc7fe48e1f41b8d43804f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/WilliamShull/guessing_game/pulls/1/commits","review_comments_url":"https://api.github.com/repos/WilliamShull/guessing_game/pulls/1/comments","review_comment_url":"https://api.github.com/repos/WilliamShull/guessing_game/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WilliamShull/guessing_game/issues/1/comments","statuses_url":"https://api.github.com/repos/WilliamShull/guessing_game/statuses/1ee92967f6d106bf78f4b5c97d1676f9bd487766","head":{"label":"abkruse:master","ref":"master","sha":"1ee92967f6d106bf78f4b5c97d1676f9bd487766","user":{"login":"abkruse","id":11687730,"avatar_url":"https://avatars.githubusercontent.com/u/11687730?v=3","gravatar_id":"","url":"https://api.github.com/users/abkruse","html_url":"https://github.com/abkruse","followers_url":"https://api.github.com/users/abkruse/followers","following_url":"https://api.github.com/users/abkruse/following{/other_user}","gists_url":"https://api.github.com/users/abkruse/gists{/gist_id}","starred_url":"https://api.github.com/users/abkruse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abkruse/subscriptions","organizations_url":"https://api.github.com/users/abkruse/orgs","repos_url":"https://api.github.com/users/abkruse/repos","events_url":"https://api.github.com/users/abkruse/events{/privacy}","received_events_url":"https://api.github.com/users/abkruse/received_events","type":"User","site_admin":false},"repo":{"id":35510561,"name":"guessing_game-1","full_name":"abkruse/guessing_game-1","owner":{"login":"abkruse","id":11687730,"avatar_url":"https://avatars.githubusercontent.com/u/11687730?v=3","gravatar_id":"","url":"https://api.github.com/users/abkruse","html_url":"https://github.com/abkruse","followers_url":"https://api.github.com/users/abkruse/followers","following_url":"https://api.github.com/users/abkruse/following{/other_user}","gists_url":"https://api.github.com/users/abkruse/gists{/gist_id}","starred_url":"https://api.github.com/users/abkruse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abkruse/subscriptions","organizations_url":"https://api.github.com/users/abkruse/orgs","repos_url":"https://api.github.com/users/abkruse/repos","events_url":"https://api.github.com/users/abkruse/events{/privacy}","received_events_url":"https://api.github.com/users/abkruse/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abkruse/guessing_game-1","description":null,"fork":true,"url":"https://api.github.com/repos/abkruse/guessing_game-1","forks_url":"https://api.github.com/repos/abkruse/guessing_game-1/forks","keys_url":"https://api.github.com/repos/abkruse/guessing_game-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abkruse/guessing_game-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abkruse/guessing_game-1/teams","hooks_url":"https://api.github.com/repos/abkruse/guessing_game-1/hooks","issue_events_url":"https://api.github.com/repos/abkruse/guessing_game-1/issues/events{/number}","events_url":"https://api.github.com/repos/abkruse/guessing_game-1/events","assignees_url":"https://api.github.com/repos/abkruse/guessing_game-1/assignees{/user}","branches_url":"https://api.github.com/repos/abkruse/guessing_game-1/branches{/branch}","tags_url":"https://api.github.com/repos/abkruse/guessing_game-1/tags","blobs_url":"https://api.github.com/repos/abkruse/guessing_game-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abkruse/guessing_game-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abkruse/guessing_game-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/abkruse/guessing_game-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abkruse/guessing_game-1/statuses/{sha}","languages_url":"https://api.github.com/repos/abkruse/guessing_game-1/languages","stargazers_url":"https://api.github.com/repos/abkruse/guessing_game-1/stargazers","contributors_url":"https://api.github.com/repos/abkruse/guessing_game-1/contributors","subscribers_url":"https://api.github.com/repos/abkruse/guessing_game-1/subscribers","subscription_url":"https://api.github.com/repos/abkruse/guessing_game-1/subscription","commits_url":"https://api.github.com/repos/abkruse/guessing_game-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/abkruse/guessing_game-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/abkruse/guessing_game-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/abkruse/guessing_game-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/abkruse/guessing_game-1/contents/{+path}","compare_url":"https://api.github.com/repos/abkruse/guessing_game-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abkruse/guessing_game-1/merges","archive_url":"https://api.github.com/repos/abkruse/guessing_game-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abkruse/guessing_game-1/downloads","issues_url":"https://api.github.com/repos/abkruse/guessing_game-1/issues{/number}","pulls_url":"https://api.github.com/repos/abkruse/guessing_game-1/pulls{/number}","milestones_url":"https://api.github.com/repos/abkruse/guessing_game-1/milestones{/number}","notifications_url":"https://api.github.com/repos/abkruse/guessing_game-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abkruse/guessing_game-1/labels{/name}","releases_url":"https://api.github.com/repos/abkruse/guessing_game-1/releases{/id}","created_at":"2015-05-12T20:18:44Z","updated_at":"2015-05-12T20:18:44Z","pushed_at":"2015-05-12T22:49:40Z","git_url":"git://github.com/abkruse/guessing_game-1.git","ssh_url":"git@github.com:abkruse/guessing_game-1.git","clone_url":"https://github.com/abkruse/guessing_game-1.git","svn_url":"https://github.com/abkruse/guessing_game-1","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"WilliamShull:master","ref":"master","sha":"c1008b9cb6b18c0a6e173f4fbc9ce41f283765dc","user":{"login":"WilliamShull","id":11906577,"avatar_url":"https://avatars.githubusercontent.com/u/11906577?v=3","gravatar_id":"","url":"https://api.github.com/users/WilliamShull","html_url":"https://github.com/WilliamShull","followers_url":"https://api.github.com/users/WilliamShull/followers","following_url":"https://api.github.com/users/WilliamShull/following{/other_user}","gists_url":"https://api.github.com/users/WilliamShull/gists{/gist_id}","starred_url":"https://api.github.com/users/WilliamShull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WilliamShull/subscriptions","organizations_url":"https://api.github.com/users/WilliamShull/orgs","repos_url":"https://api.github.com/users/WilliamShull/repos","events_url":"https://api.github.com/users/WilliamShull/events{/privacy}","received_events_url":"https://api.github.com/users/WilliamShull/received_events","type":"User","site_admin":false},"repo":{"id":35510007,"name":"guessing_game","full_name":"WilliamShull/guessing_game","owner":{"login":"WilliamShull","id":11906577,"avatar_url":"https://avatars.githubusercontent.com/u/11906577?v=3","gravatar_id":"","url":"https://api.github.com/users/WilliamShull","html_url":"https://github.com/WilliamShull","followers_url":"https://api.github.com/users/WilliamShull/followers","following_url":"https://api.github.com/users/WilliamShull/following{/other_user}","gists_url":"https://api.github.com/users/WilliamShull/gists{/gist_id}","starred_url":"https://api.github.com/users/WilliamShull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WilliamShull/subscriptions","organizations_url":"https://api.github.com/users/WilliamShull/orgs","repos_url":"https://api.github.com/users/WilliamShull/repos","events_url":"https://api.github.com/users/WilliamShull/events{/privacy}","received_events_url":"https://api.github.com/users/WilliamShull/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/WilliamShull/guessing_game","description":null,"fork":false,"url":"https://api.github.com/repos/WilliamShull/guessing_game","forks_url":"https://api.github.com/repos/WilliamShull/guessing_game/forks","keys_url":"https://api.github.com/repos/WilliamShull/guessing_game/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WilliamShull/guessing_game/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WilliamShull/guessing_game/teams","hooks_url":"https://api.github.com/repos/WilliamShull/guessing_game/hooks","issue_events_url":"https://api.github.com/repos/WilliamShull/guessing_game/issues/events{/number}","events_url":"https://api.github.com/repos/WilliamShull/guessing_game/events","assignees_url":"https://api.github.com/repos/WilliamShull/guessing_game/assignees{/user}","branches_url":"https://api.github.com/repos/WilliamShull/guessing_game/branches{/branch}","tags_url":"https://api.github.com/repos/WilliamShull/guessing_game/tags","blobs_url":"https://api.github.com/repos/WilliamShull/guessing_game/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WilliamShull/guessing_game/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WilliamShull/guessing_game/git/refs{/sha}","trees_url":"https://api.github.com/repos/WilliamShull/guessing_game/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WilliamShull/guessing_game/statuses/{sha}","languages_url":"https://api.github.com/repos/WilliamShull/guessing_game/languages","stargazers_url":"https://api.github.com/repos/WilliamShull/guessing_game/stargazers","contributors_url":"https://api.github.com/repos/WilliamShull/guessing_game/contributors","subscribers_url":"https://api.github.com/repos/WilliamShull/guessing_game/subscribers","subscription_url":"https://api.github.com/repos/WilliamShull/guessing_game/subscription","commits_url":"https://api.github.com/repos/WilliamShull/guessing_game/commits{/sha}","git_commits_url":"https://api.github.com/repos/WilliamShull/guessing_game/git/commits{/sha}","comments_url":"https://api.github.com/repos/WilliamShull/guessing_game/comments{/number}","issue_comment_url":"https://api.github.com/repos/WilliamShull/guessing_game/issues/comments{/number}","contents_url":"https://api.github.com/repos/WilliamShull/guessing_game/contents/{+path}","compare_url":"https://api.github.com/repos/WilliamShull/guessing_game/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WilliamShull/guessing_game/merges","archive_url":"https://api.github.com/repos/WilliamShull/guessing_game/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WilliamShull/guessing_game/downloads","issues_url":"https://api.github.com/repos/WilliamShull/guessing_game/issues{/number}","pulls_url":"https://api.github.com/repos/WilliamShull/guessing_game/pulls{/number}","milestones_url":"https://api.github.com/repos/WilliamShull/guessing_game/milestones{/number}","notifications_url":"https://api.github.com/repos/WilliamShull/guessing_game/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WilliamShull/guessing_game/labels{/name}","releases_url":"https://api.github.com/repos/WilliamShull/guessing_game/releases{/id}","created_at":"2015-05-12T20:06:02Z","updated_at":"2015-05-12T20:06:06Z","pushed_at":"2015-05-14T00:49:56Z","git_url":"git://github.com/WilliamShull/guessing_game.git","ssh_url":"git@github.com:WilliamShull/guessing_game.git","clone_url":"https://github.com/WilliamShull/guessing_game.git","svn_url":"https://github.com/WilliamShull/guessing_game","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":0,"forks":3,"open_issues":0,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/WilliamShull/guessing_game/pulls/1"},"html":{"href":"https://github.com/WilliamShull/guessing_game/pull/1"},"issue":{"href":"https://api.github.com/repos/WilliamShull/guessing_game/issues/1"},"comments":{"href":"https://api.github.com/repos/WilliamShull/guessing_game/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/WilliamShull/guessing_game/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/WilliamShull/guessing_game/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WilliamShull/guessing_game/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/WilliamShull/guessing_game/statuses/1ee92967f6d106bf78f4b5c97d1676f9bd487766"}}}}