{"action":"created","comment":{"url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/pulls/comments/34958800","id":34958800,"diff_hunk":"@@ -1,24 +1,64 @@\n-/* For picking letters from alphabet keypad. Returns the\n-   letter chosen or \"already picked\"\n-*/\n-function pickLetter(letter) {\n-  \"use strict\";\n-  var result;\n-\n-  if (letter.className === \"letter-button\") {\n-    result = letter.innerHTML;\n-    letter.className = \"letter-disabled\";\n-  } else {\n-    result = \"already picked\";\n-  }\n-\n-  console.log(result);    // for testing, remove later\n-  return result;\n+/*\n+ * Pick from alphabet keypad. Returns the letter chosen.\n+ */\n+$(\"#alphabet-keypad\").on(\"click\", \".letter-button\", pickLetter);\n+\n+function pickLetter() {\n+  var letterChosen = $(this);\n+  \n+  letterChosen\n+    .removeClass(\"letter-button\")\n+    .addClass(\"letter-disabled\");\n+\n+  // Next two lines to be refactored into interface for\n+  //   checking if the letter is in the word.\n+  \n+  letterChosen = letterChosen.html();\n+  \n+  verify(letterChosen);\n }\n \n-// adding dictionary and word filter //\n+// placeholder for verifying the letter\n+function verify(letter) {\n+  console.log(letter);\n+}\n \n \n+/*\n+ * Hangman Object with methods loseLife() and reset()\n+ */\n+var hangmanObject = function () {\n+  var livesLost = 0,\n+      maxLife = 7;\n+  \n+  return {\n+    loseLife : function () {","path":"scripts.js","position":null,"original_position":52,"commit_id":"2bd158e8d185b9240d30025aaf52a32792e06215","original_commit_id":"fd05a04474c2e3fe9d07fb504156c779e2dbd2f2","user":{"login":"simonxca","id":10586163,"avatar_url":"https://avatars.githubusercontent.com/u/10586163?v=3","gravatar_id":"","url":"https://api.github.com/users/simonxca","html_url":"https://github.com/simonxca","followers_url":"https://api.github.com/users/simonxca/followers","following_url":"https://api.github.com/users/simonxca/following{/other_user}","gists_url":"https://api.github.com/users/simonxca/gists{/gist_id}","starred_url":"https://api.github.com/users/simonxca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonxca/subscriptions","organizations_url":"https://api.github.com/users/simonxca/orgs","repos_url":"https://api.github.com/users/simonxca/repos","events_url":"https://api.github.com/users/simonxca/events{/privacy}","received_events_url":"https://api.github.com/users/simonxca/received_events","type":"User","site_admin":false},"body":"The idea now is we can combine this with @piecedigital changes. Whenever he puts a letter in the graveyard, he'll also call hangmanGraphic.addBodyPart() so the graphic corresponds to the gameplay.\r\n\r\nAlso whoever is working on the part that resets the game can call hangmanGraphic.reset() to reset the graphic as well.","created_at":"2015-07-19T14:57:19Z","updated_at":"2015-07-19T14:57:19Z","html_url":"https://github.com/code-newbies/js-tuesday-hangman/pull/45#discussion_r34958800","pull_request_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/pulls/45","_links":{"self":{"href":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/pulls/comments/34958800"},"html":{"href":"https://github.com/code-newbies/js-tuesday-hangman/pull/45#discussion_r34958800"},"pull_request":{"href":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/pulls/45"}}},"pull_request":{"url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/pulls/45","id":40293571,"html_url":"https://github.com/code-newbies/js-tuesday-hangman/pull/45","diff_url":"https://github.com/code-newbies/js-tuesday-hangman/pull/45.diff","patch_url":"https://github.com/code-newbies/js-tuesday-hangman/pull/45.patch","issue_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/issues/45","number":45,"state":"open","locked":false,"title":"Adds alphabet keypad and hangman","user":{"login":"simonxca","id":10586163,"avatar_url":"https://avatars.githubusercontent.com/u/10586163?v=3","gravatar_id":"","url":"https://api.github.com/users/simonxca","html_url":"https://github.com/simonxca","followers_url":"https://api.github.com/users/simonxca/followers","following_url":"https://api.github.com/users/simonxca/following{/other_user}","gists_url":"https://api.github.com/users/simonxca/gists{/gist_id}","starred_url":"https://api.github.com/users/simonxca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonxca/subscriptions","organizations_url":"https://api.github.com/users/simonxca/orgs","repos_url":"https://api.github.com/users/simonxca/repos","events_url":"https://api.github.com/users/simonxca/events{/privacy}","received_events_url":"https://api.github.com/users/simonxca/received_events","type":"User","site_admin":false},"body":"Adds the alpha keypad and hangman graphic.","created_at":"2015-07-18T15:22:20Z","updated_at":"2015-07-19T14:57:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c28f3f8a018ed0eef79ca2a8a9c51638e99d3c16","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/pulls/45/commits","review_comments_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/pulls/45/comments","review_comment_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/pulls/comments{/number}","comments_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/issues/45/comments","statuses_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/statuses/2bd158e8d185b9240d30025aaf52a32792e06215","head":{"label":"code-newbies:simon-keypad-hangman","ref":"simon-keypad-hangman","sha":"2bd158e8d185b9240d30025aaf52a32792e06215","user":{"login":"code-newbies","id":9603979,"avatar_url":"https://avatars.githubusercontent.com/u/9603979?v=3","gravatar_id":"","url":"https://api.github.com/users/code-newbies","html_url":"https://github.com/code-newbies","followers_url":"https://api.github.com/users/code-newbies/followers","following_url":"https://api.github.com/users/code-newbies/following{/other_user}","gists_url":"https://api.github.com/users/code-newbies/gists{/gist_id}","starred_url":"https://api.github.com/users/code-newbies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-newbies/subscriptions","organizations_url":"https://api.github.com/users/code-newbies/orgs","repos_url":"https://api.github.com/users/code-newbies/repos","events_url":"https://api.github.com/users/code-newbies/events{/privacy}","received_events_url":"https://api.github.com/users/code-newbies/received_events","type":"Organization","site_admin":false},"repo":{"id":37027017,"name":"js-tuesday-hangman","full_name":"code-newbies/js-tuesday-hangman","owner":{"login":"code-newbies","id":9603979,"avatar_url":"https://avatars.githubusercontent.com/u/9603979?v=3","gravatar_id":"","url":"https://api.github.com/users/code-newbies","html_url":"https://github.com/code-newbies","followers_url":"https://api.github.com/users/code-newbies/followers","following_url":"https://api.github.com/users/code-newbies/following{/other_user}","gists_url":"https://api.github.com/users/code-newbies/gists{/gist_id}","starred_url":"https://api.github.com/users/code-newbies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-newbies/subscriptions","organizations_url":"https://api.github.com/users/code-newbies/orgs","repos_url":"https://api.github.com/users/code-newbies/repos","events_url":"https://api.github.com/users/code-newbies/events{/privacy}","received_events_url":"https://api.github.com/users/code-newbies/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/code-newbies/js-tuesday-hangman","description":"A hangman game from the JavaScript Tuesday crew.","fork":false,"url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman","forks_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/forks","keys_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/teams","hooks_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/hooks","issue_events_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/issues/events{/number}","events_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/events","assignees_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/assignees{/user}","branches_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/branches{/branch}","tags_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/tags","blobs_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/git/refs{/sha}","trees_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/statuses/{sha}","languages_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/languages","stargazers_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/stargazers","contributors_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/contributors","subscribers_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/subscribers","subscription_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/subscription","commits_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/commits{/sha}","git_commits_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/git/commits{/sha}","comments_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/comments{/number}","issue_comment_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/issues/comments{/number}","contents_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/contents/{+path}","compare_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/merges","archive_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/downloads","issues_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/issues{/number}","pulls_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/pulls{/number}","milestones_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/milestones{/number}","notifications_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/labels{/name}","releases_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/releases{/id}","created_at":"2015-06-07T18:20:54Z","updated_at":"2015-07-16T16:32:05Z","pushed_at":"2015-07-19T14:44:12Z","git_url":"git://github.com/code-newbies/js-tuesday-hangman.git","ssh_url":"git@github.com:code-newbies/js-tuesday-hangman.git","clone_url":"https://github.com/code-newbies/js-tuesday-hangman.git","svn_url":"https://github.com/code-newbies/js-tuesday-hangman","homepage":null,"size":3303,"stargazers_count":10,"watchers_count":10,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":3,"forks":10,"open_issues":3,"watchers":10,"default_branch":"master"}},"base":{"label":"code-newbies:master","ref":"master","sha":"1b925910c236d5c16266f3e3a1020272d25b9de9","user":{"login":"code-newbies","id":9603979,"avatar_url":"https://avatars.githubusercontent.com/u/9603979?v=3","gravatar_id":"","url":"https://api.github.com/users/code-newbies","html_url":"https://github.com/code-newbies","followers_url":"https://api.github.com/users/code-newbies/followers","following_url":"https://api.github.com/users/code-newbies/following{/other_user}","gists_url":"https://api.github.com/users/code-newbies/gists{/gist_id}","starred_url":"https://api.github.com/users/code-newbies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-newbies/subscriptions","organizations_url":"https://api.github.com/users/code-newbies/orgs","repos_url":"https://api.github.com/users/code-newbies/repos","events_url":"https://api.github.com/users/code-newbies/events{/privacy}","received_events_url":"https://api.github.com/users/code-newbies/received_events","type":"Organization","site_admin":false},"repo":{"id":37027017,"name":"js-tuesday-hangman","full_name":"code-newbies/js-tuesday-hangman","owner":{"login":"code-newbies","id":9603979,"avatar_url":"https://avatars.githubusercontent.com/u/9603979?v=3","gravatar_id":"","url":"https://api.github.com/users/code-newbies","html_url":"https://github.com/code-newbies","followers_url":"https://api.github.com/users/code-newbies/followers","following_url":"https://api.github.com/users/code-newbies/following{/other_user}","gists_url":"https://api.github.com/users/code-newbies/gists{/gist_id}","starred_url":"https://api.github.com/users/code-newbies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-newbies/subscriptions","organizations_url":"https://api.github.com/users/code-newbies/orgs","repos_url":"https://api.github.com/users/code-newbies/repos","events_url":"https://api.github.com/users/code-newbies/events{/privacy}","received_events_url":"https://api.github.com/users/code-newbies/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/code-newbies/js-tuesday-hangman","description":"A hangman game from the JavaScript Tuesday crew.","fork":false,"url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman","forks_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/forks","keys_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/teams","hooks_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/hooks","issue_events_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/issues/events{/number}","events_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/events","assignees_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/assignees{/user}","branches_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/branches{/branch}","tags_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/tags","blobs_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/git/refs{/sha}","trees_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/statuses/{sha}","languages_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/languages","stargazers_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/stargazers","contributors_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/contributors","subscribers_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/subscribers","subscription_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/subscription","commits_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/commits{/sha}","git_commits_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/git/commits{/sha}","comments_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/comments{/number}","issue_comment_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/issues/comments{/number}","contents_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/contents/{+path}","compare_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/merges","archive_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/downloads","issues_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/issues{/number}","pulls_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/pulls{/number}","milestones_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/milestones{/number}","notifications_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/labels{/name}","releases_url":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/releases{/id}","created_at":"2015-06-07T18:20:54Z","updated_at":"2015-07-16T16:32:05Z","pushed_at":"2015-07-19T14:44:12Z","git_url":"git://github.com/code-newbies/js-tuesday-hangman.git","ssh_url":"git@github.com:code-newbies/js-tuesday-hangman.git","clone_url":"https://github.com/code-newbies/js-tuesday-hangman.git","svn_url":"https://github.com/code-newbies/js-tuesday-hangman","homepage":null,"size":3303,"stargazers_count":10,"watchers_count":10,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":3,"forks":10,"open_issues":3,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/pulls/45"},"html":{"href":"https://github.com/code-newbies/js-tuesday-hangman/pull/45"},"issue":{"href":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/issues/45"},"comments":{"href":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/issues/45/comments"},"review_comments":{"href":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/pulls/45/comments"},"review_comment":{"href":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/pulls/45/commits"},"statuses":{"href":"https://api.github.com/repos/code-newbies/js-tuesday-hangman/statuses/2bd158e8d185b9240d30025aaf52a32792e06215"}}}}