{"action":"created","comment":{"url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/pulls/comments/31298051","id":31298051,"diff_hunk":"@@ -0,0 +1,90 @@\n+module Scrabble\n+  class Scrabble\n+\n+\n+    # would have preferred to nest letters in array as hash values\n+    TILE_VALUES = {\n+      \"A\" => 1,\n+      \"B\" => 3,\n+      \"C\" => 3,\n+      \"D\" => 2,\n+      \"E\" => 1,\n+      \"F\" => 4,\n+      \"G\" => 2,\n+      \"H\" => 4,\n+      \"I\" => 1,\n+      \"J\" => 8,\n+      \"K\" => 5,\n+      \"L\" => 1,\n+      \"M\" => 3,\n+      \"N\" => 1,\n+      \"O\" => 1,\n+      \"P\" => 3,\n+      \"Q\" => 10,\n+      \"R\" => 1,\n+      \"S\" => 1,\n+      \"T\" => 1,\n+      \"U\" => 1,\n+      \"V\" => 4,\n+      \"W\" => 4,\n+      \"X\" => 8,\n+      \"Y\" => 4,\n+      \"Z\" => 10\n+    }\n+\n+\n+    def self.score(word)\n+\n+      stripped_word = word.gsub(/\\W+/, '')\n+      word_tiles = stripped_word.upcase.split(//)\n+      if word_tiles.length > 7\n+        return nil\n+      end\n+\n+      scores = []\n+      word_tiles.each do |letter|\n+        if TILE_VALUES.has_key?(letter)\n+          scores << TILE_VALUES[letter]\n+        end\n+      end\n+      # sum values of letters to score word\n+      return scores.reduce(:+)","path":"lib/scrabble/scrabble.rb","position":51,"original_position":51,"commit_id":"671323d9f95304450e51ef9ecfc6d31be6f14598","original_commit_id":"671323d9f95304450e51ef9ecfc6d31be6f14598","user":{"login":"Elffers","id":5466070,"avatar_url":"https://avatars.githubusercontent.com/u/5466070?v=3","gravatar_id":"","url":"https://api.github.com/users/Elffers","html_url":"https://github.com/Elffers","followers_url":"https://api.github.com/users/Elffers/followers","following_url":"https://api.github.com/users/Elffers/following{/other_user}","gists_url":"https://api.github.com/users/Elffers/gists{/gist_id}","starred_url":"https://api.github.com/users/Elffers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Elffers/subscriptions","organizations_url":"https://api.github.com/users/Elffers/orgs","repos_url":"https://api.github.com/users/Elffers/repos","events_url":"https://api.github.com/users/Elffers/events{/privacy}","received_events_url":"https://api.github.com/users/Elffers/received_events","type":"User","site_admin":false},"body":"👏 on use of reduce!","created_at":"2015-05-29T04:17:09Z","updated_at":"2015-05-29T04:17:09Z","html_url":"https://github.com/Ada-Developers-Academy/C3Projects--Scrabble/pull/19#discussion_r31298051","pull_request_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/pulls/19","_links":{"self":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/pulls/comments/31298051"},"html":{"href":"https://github.com/Ada-Developers-Academy/C3Projects--Scrabble/pull/19#discussion_r31298051"},"pull_request":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/pulls/19","id":36377128,"html_url":"https://github.com/Ada-Developers-Academy/C3Projects--Scrabble/pull/19","diff_url":"https://github.com/Ada-Developers-Academy/C3Projects--Scrabble/pull/19.diff","patch_url":"https://github.com/Ada-Developers-Academy/C3Projects--Scrabble/pull/19.patch","issue_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/issues/19","number":19,"state":"open","locked":false,"title":"Scrabble project. breakfast","user":{"login":"elsamoluf","id":10170087,"avatar_url":"https://avatars.githubusercontent.com/u/10170087?v=3","gravatar_id":"","url":"https://api.github.com/users/elsamoluf","html_url":"https://github.com/elsamoluf","followers_url":"https://api.github.com/users/elsamoluf/followers","following_url":"https://api.github.com/users/elsamoluf/following{/other_user}","gists_url":"https://api.github.com/users/elsamoluf/gists{/gist_id}","starred_url":"https://api.github.com/users/elsamoluf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elsamoluf/subscriptions","organizations_url":"https://api.github.com/users/elsamoluf/orgs","repos_url":"https://api.github.com/users/elsamoluf/repos","events_url":"https://api.github.com/users/elsamoluf/events{/privacy}","received_events_url":"https://api.github.com/users/elsamoluf/received_events","type":"User","site_admin":false},"body":"I completed the scrabble project through the breakfast tier. Simplified my highest_score_from method by a long shot! Even got the testing in, though I'm still not too sure about how to use rspec tests most effectively. Definitely missing lots of cases, so an eye on that would be helpful!","created_at":"2015-05-28T07:01:25Z","updated_at":"2015-05-29T04:17:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d9344766434294c18539e4604a5462c87ef8c995","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/pulls/19/commits","review_comments_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/pulls/19/comments","review_comment_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/issues/19/comments","statuses_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/statuses/671323d9f95304450e51ef9ecfc6d31be6f14598","head":{"label":"elsamoluf:edm/master","ref":"edm/master","sha":"671323d9f95304450e51ef9ecfc6d31be6f14598","user":{"login":"elsamoluf","id":10170087,"avatar_url":"https://avatars.githubusercontent.com/u/10170087?v=3","gravatar_id":"","url":"https://api.github.com/users/elsamoluf","html_url":"https://github.com/elsamoluf","followers_url":"https://api.github.com/users/elsamoluf/followers","following_url":"https://api.github.com/users/elsamoluf/following{/other_user}","gists_url":"https://api.github.com/users/elsamoluf/gists{/gist_id}","starred_url":"https://api.github.com/users/elsamoluf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elsamoluf/subscriptions","organizations_url":"https://api.github.com/users/elsamoluf/orgs","repos_url":"https://api.github.com/users/elsamoluf/repos","events_url":"https://api.github.com/users/elsamoluf/events{/privacy}","received_events_url":"https://api.github.com/users/elsamoluf/received_events","type":"User","site_admin":false},"repo":{"id":36325868,"name":"C3Projects--Scrabble","full_name":"elsamoluf/C3Projects--Scrabble","owner":{"login":"elsamoluf","id":10170087,"avatar_url":"https://avatars.githubusercontent.com/u/10170087?v=3","gravatar_id":"","url":"https://api.github.com/users/elsamoluf","html_url":"https://github.com/elsamoluf","followers_url":"https://api.github.com/users/elsamoluf/followers","following_url":"https://api.github.com/users/elsamoluf/following{/other_user}","gists_url":"https://api.github.com/users/elsamoluf/gists{/gist_id}","starred_url":"https://api.github.com/users/elsamoluf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elsamoluf/subscriptions","organizations_url":"https://api.github.com/users/elsamoluf/orgs","repos_url":"https://api.github.com/users/elsamoluf/repos","events_url":"https://api.github.com/users/elsamoluf/events{/privacy}","received_events_url":"https://api.github.com/users/elsamoluf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/elsamoluf/C3Projects--Scrabble","description":"Cohort[2] Scrabble project","fork":true,"url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble","forks_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/forks","keys_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/teams","hooks_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/hooks","issue_events_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/issues/events{/number}","events_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/events","assignees_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/assignees{/user}","branches_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/branches{/branch}","tags_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/tags","blobs_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/git/refs{/sha}","trees_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/statuses/{sha}","languages_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/languages","stargazers_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/stargazers","contributors_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/contributors","subscribers_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/subscribers","subscription_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/subscription","commits_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/commits{/sha}","git_commits_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/git/commits{/sha}","comments_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/comments{/number}","issue_comment_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/issues/comments{/number}","contents_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/contents/{+path}","compare_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/merges","archive_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/downloads","issues_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/issues{/number}","pulls_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/pulls{/number}","milestones_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/milestones{/number}","notifications_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/labels{/name}","releases_url":"https://api.github.com/repos/elsamoluf/C3Projects--Scrabble/releases{/id}","created_at":"2015-05-26T21:51:34Z","updated_at":"2015-05-26T21:51:34Z","pushed_at":"2015-05-28T06:52:45Z","git_url":"git://github.com/elsamoluf/C3Projects--Scrabble.git","ssh_url":"git@github.com:elsamoluf/C3Projects--Scrabble.git","clone_url":"https://github.com/elsamoluf/C3Projects--Scrabble.git","svn_url":"https://github.com/elsamoluf/C3Projects--Scrabble","homepage":null,"size":98,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"Ada-Developers-Academy:edm/master","ref":"edm/master","sha":"8304b5b3328d8f856b61e6a742113cb16a86cd88","user":{"login":"Ada-Developers-Academy","id":4689715,"avatar_url":"https://avatars.githubusercontent.com/u/4689715?v=3","gravatar_id":"","url":"https://api.github.com/users/Ada-Developers-Academy","html_url":"https://github.com/Ada-Developers-Academy","followers_url":"https://api.github.com/users/Ada-Developers-Academy/followers","following_url":"https://api.github.com/users/Ada-Developers-Academy/following{/other_user}","gists_url":"https://api.github.com/users/Ada-Developers-Academy/gists{/gist_id}","starred_url":"https://api.github.com/users/Ada-Developers-Academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ada-Developers-Academy/subscriptions","organizations_url":"https://api.github.com/users/Ada-Developers-Academy/orgs","repos_url":"https://api.github.com/users/Ada-Developers-Academy/repos","events_url":"https://api.github.com/users/Ada-Developers-Academy/events{/privacy}","received_events_url":"https://api.github.com/users/Ada-Developers-Academy/received_events","type":"Organization","site_admin":false},"repo":{"id":36305785,"name":"C3Projects--Scrabble","full_name":"Ada-Developers-Academy/C3Projects--Scrabble","owner":{"login":"Ada-Developers-Academy","id":4689715,"avatar_url":"https://avatars.githubusercontent.com/u/4689715?v=3","gravatar_id":"","url":"https://api.github.com/users/Ada-Developers-Academy","html_url":"https://github.com/Ada-Developers-Academy","followers_url":"https://api.github.com/users/Ada-Developers-Academy/followers","following_url":"https://api.github.com/users/Ada-Developers-Academy/following{/other_user}","gists_url":"https://api.github.com/users/Ada-Developers-Academy/gists{/gist_id}","starred_url":"https://api.github.com/users/Ada-Developers-Academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ada-Developers-Academy/subscriptions","organizations_url":"https://api.github.com/users/Ada-Developers-Academy/orgs","repos_url":"https://api.github.com/users/Ada-Developers-Academy/repos","events_url":"https://api.github.com/users/Ada-Developers-Academy/events{/privacy}","received_events_url":"https://api.github.com/users/Ada-Developers-Academy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Ada-Developers-Academy/C3Projects--Scrabble","description":"Cohort[2] Scrabble project","fork":false,"url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble","forks_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/forks","keys_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/teams","hooks_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/hooks","issue_events_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/issues/events{/number}","events_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/events","assignees_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/assignees{/user}","branches_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/branches{/branch}","tags_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/tags","blobs_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/statuses/{sha}","languages_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/languages","stargazers_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/stargazers","contributors_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/contributors","subscribers_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/subscribers","subscription_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/subscription","commits_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/contents/{+path}","compare_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/merges","archive_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/downloads","issues_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/issues{/number}","pulls_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/pulls{/number}","milestones_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/milestones{/number}","notifications_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/labels{/name}","releases_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/releases{/id}","created_at":"2015-05-26T15:35:52Z","updated_at":"2015-05-26T15:48:41Z","pushed_at":"2015-05-29T03:26:13Z","git_url":"git://github.com/Ada-Developers-Academy/C3Projects--Scrabble.git","ssh_url":"git@github.com:Ada-Developers-Academy/C3Projects--Scrabble.git","clone_url":"https://github.com/Ada-Developers-Academy/C3Projects--Scrabble.git","svn_url":"https://github.com/Ada-Developers-Academy/C3Projects--Scrabble","homepage":null,"size":730,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":24,"forks":26,"open_issues":24,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/pulls/19"},"html":{"href":"https://github.com/Ada-Developers-Academy/C3Projects--Scrabble/pull/19"},"issue":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/issues/19"},"comments":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--Scrabble/statuses/671323d9f95304450e51ef9ecfc6d31be6f14598"}}}}