{"action":"created","comment":{"url":"https://api.github.com/repos/makersacademy/rps-challenge/pulls/comments/25161420","id":25161420,"diff_hunk":"@@ -0,0 +1,44 @@\n+class Game\n+\n+  attr_accessor :players\n+\n+  def initialize\n+    @players = []\n+  end\n+\n+  def add_player(player)\n+    raise 'Only 2 players allowed' if @players.length == 2\n+    @players << player\n+  end\n+\n+#neeed to find a way to refactor the method below as it is far too big\n+\n+  def result\n+    if @players.first.weapon_choice == \"scissors\"\n+      if @players.last.weapon_choice == \"rock\"","path":"lib/game.rb","position":18,"original_position":18,"commit_id":"cd3b2d8e17b5376b35278466bb5d3bfca6ba9b1b","original_commit_id":"cd3b2d8e17b5376b35278466bb5d3bfca6ba9b1b","user":{"login":"stephenlloyd","id":196474,"avatar_url":"https://avatars.githubusercontent.com/u/196474?v=3","gravatar_id":"","url":"https://api.github.com/users/stephenlloyd","html_url":"https://github.com/stephenlloyd","followers_url":"https://api.github.com/users/stephenlloyd/followers","following_url":"https://api.github.com/users/stephenlloyd/following{/other_user}","gists_url":"https://api.github.com/users/stephenlloyd/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenlloyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenlloyd/subscriptions","organizations_url":"https://api.github.com/users/stephenlloyd/orgs","repos_url":"https://api.github.com/users/stephenlloyd/repos","events_url":"https://api.github.com/users/stephenlloyd/events{/privacy}","received_events_url":"https://api.github.com/users/stephenlloyd/received_events","type":"User","site_admin":false},"body":"so you're saying rock beats scissors, papers beats... that could look like this \r\n```ruby \r\nwinners = {\"rock\" => \"scissors\" }\r\n```\r\nthis way the you can do something like \r\n```ruby\r\nwinners[@players.first.weapon_choice] == @players.last.weapon_of_choice\r\n```\r\nthis would mean that the first player beat the second player\r\n```","created_at":"2015-02-23T12:59:15Z","updated_at":"2015-02-23T12:59:15Z","html_url":"https://github.com/makersacademy/rps-challenge/pull/13#discussion_r25161420","pull_request_url":"https://api.github.com/repos/makersacademy/rps-challenge/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/makersacademy/rps-challenge/pulls/comments/25161420"},"html":{"href":"https://github.com/makersacademy/rps-challenge/pull/13#discussion_r25161420"},"pull_request":{"href":"https://api.github.com/repos/makersacademy/rps-challenge/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/makersacademy/rps-challenge/pulls/13","id":29793334,"html_url":"https://github.com/makersacademy/rps-challenge/pull/13","diff_url":"https://github.com/makersacademy/rps-challenge/pull/13.diff","patch_url":"https://github.com/makersacademy/rps-challenge/pull/13.patch","issue_url":"https://api.github.com/repos/makersacademy/rps-challenge/issues/13","number":13,"state":"open","locked":false,"title":"single player game works with option to play game again","user":{"login":"wardymate","id":6054003,"avatar_url":"https://avatars.githubusercontent.com/u/6054003?v=3","gravatar_id":"","url":"https://api.github.com/users/wardymate","html_url":"https://github.com/wardymate","followers_url":"https://api.github.com/users/wardymate/followers","following_url":"https://api.github.com/users/wardymate/following{/other_user}","gists_url":"https://api.github.com/users/wardymate/gists{/gist_id}","starred_url":"https://api.github.com/users/wardymate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wardymate/subscriptions","organizations_url":"https://api.github.com/users/wardymate/orgs","repos_url":"https://api.github.com/users/wardymate/repos","events_url":"https://api.github.com/users/wardymate/events{/privacy}","received_events_url":"https://api.github.com/users/wardymate/received_events","type":"User","site_admin":false},"body":"Cucumber test failing and lots of refactoring needed will continue to work on and expand the features further.\r\n\r\nhttps://pure-brook-4821.herokuapp.com/","created_at":"2015-02-23T08:58:18Z","updated_at":"2015-02-23T12:59:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0b987853643599c801811dd6523a7c97b134694e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/makersacademy/rps-challenge/pulls/13/commits","review_comments_url":"https://api.github.com/repos/makersacademy/rps-challenge/pulls/13/comments","review_comment_url":"https://api.github.com/repos/makersacademy/rps-challenge/pulls/comments{/number}","comments_url":"https://api.github.com/repos/makersacademy/rps-challenge/issues/13/comments","statuses_url":"https://api.github.com/repos/makersacademy/rps-challenge/statuses/cd3b2d8e17b5376b35278466bb5d3bfca6ba9b1b","head":{"label":"wardymate:master","ref":"master","sha":"cd3b2d8e17b5376b35278466bb5d3bfca6ba9b1b","user":{"login":"wardymate","id":6054003,"avatar_url":"https://avatars.githubusercontent.com/u/6054003?v=3","gravatar_id":"","url":"https://api.github.com/users/wardymate","html_url":"https://github.com/wardymate","followers_url":"https://api.github.com/users/wardymate/followers","following_url":"https://api.github.com/users/wardymate/following{/other_user}","gists_url":"https://api.github.com/users/wardymate/gists{/gist_id}","starred_url":"https://api.github.com/users/wardymate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wardymate/subscriptions","organizations_url":"https://api.github.com/users/wardymate/orgs","repos_url":"https://api.github.com/users/wardymate/repos","events_url":"https://api.github.com/users/wardymate/events{/privacy}","received_events_url":"https://api.github.com/users/wardymate/received_events","type":"User","site_admin":false},"repo":{"id":31062622,"name":"rps-challenge","full_name":"wardymate/rps-challenge","owner":{"login":"wardymate","id":6054003,"avatar_url":"https://avatars.githubusercontent.com/u/6054003?v=3","gravatar_id":"","url":"https://api.github.com/users/wardymate","html_url":"https://github.com/wardymate","followers_url":"https://api.github.com/users/wardymate/followers","following_url":"https://api.github.com/users/wardymate/following{/other_user}","gists_url":"https://api.github.com/users/wardymate/gists{/gist_id}","starred_url":"https://api.github.com/users/wardymate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wardymate/subscriptions","organizations_url":"https://api.github.com/users/wardymate/orgs","repos_url":"https://api.github.com/users/wardymate/repos","events_url":"https://api.github.com/users/wardymate/events{/privacy}","received_events_url":"https://api.github.com/users/wardymate/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wardymate/rps-challenge","description":"Create the Rock Paper Scissors Game","fork":true,"url":"https://api.github.com/repos/wardymate/rps-challenge","forks_url":"https://api.github.com/repos/wardymate/rps-challenge/forks","keys_url":"https://api.github.com/repos/wardymate/rps-challenge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wardymate/rps-challenge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wardymate/rps-challenge/teams","hooks_url":"https://api.github.com/repos/wardymate/rps-challenge/hooks","issue_events_url":"https://api.github.com/repos/wardymate/rps-challenge/issues/events{/number}","events_url":"https://api.github.com/repos/wardymate/rps-challenge/events","assignees_url":"https://api.github.com/repos/wardymate/rps-challenge/assignees{/user}","branches_url":"https://api.github.com/repos/wardymate/rps-challenge/branches{/branch}","tags_url":"https://api.github.com/repos/wardymate/rps-challenge/tags","blobs_url":"https://api.github.com/repos/wardymate/rps-challenge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wardymate/rps-challenge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wardymate/rps-challenge/git/refs{/sha}","trees_url":"https://api.github.com/repos/wardymate/rps-challenge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wardymate/rps-challenge/statuses/{sha}","languages_url":"https://api.github.com/repos/wardymate/rps-challenge/languages","stargazers_url":"https://api.github.com/repos/wardymate/rps-challenge/stargazers","contributors_url":"https://api.github.com/repos/wardymate/rps-challenge/contributors","subscribers_url":"https://api.github.com/repos/wardymate/rps-challenge/subscribers","subscription_url":"https://api.github.com/repos/wardymate/rps-challenge/subscription","commits_url":"https://api.github.com/repos/wardymate/rps-challenge/commits{/sha}","git_commits_url":"https://api.github.com/repos/wardymate/rps-challenge/git/commits{/sha}","comments_url":"https://api.github.com/repos/wardymate/rps-challenge/comments{/number}","issue_comment_url":"https://api.github.com/repos/wardymate/rps-challenge/issues/comments{/number}","contents_url":"https://api.github.com/repos/wardymate/rps-challenge/contents/{+path}","compare_url":"https://api.github.com/repos/wardymate/rps-challenge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wardymate/rps-challenge/merges","archive_url":"https://api.github.com/repos/wardymate/rps-challenge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wardymate/rps-challenge/downloads","issues_url":"https://api.github.com/repos/wardymate/rps-challenge/issues{/number}","pulls_url":"https://api.github.com/repos/wardymate/rps-challenge/pulls{/number}","milestones_url":"https://api.github.com/repos/wardymate/rps-challenge/milestones{/number}","notifications_url":"https://api.github.com/repos/wardymate/rps-challenge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wardymate/rps-challenge/labels{/name}","releases_url":"https://api.github.com/repos/wardymate/rps-challenge/releases{/id}","created_at":"2015-02-20T11:45:37Z","updated_at":"2015-02-23T09:51:09Z","pushed_at":"2015-02-23T09:51:09Z","git_url":"git://github.com/wardymate/rps-challenge.git","ssh_url":"git@github.com:wardymate/rps-challenge.git","clone_url":"https://github.com/wardymate/rps-challenge.git","svn_url":"https://github.com/wardymate/rps-challenge","homepage":null,"size":155,"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":"makersacademy:master","ref":"master","sha":"9799328ada5a799f838ce98991d8dc9eb88737c1","user":{"login":"makersacademy","id":3636186,"avatar_url":"https://avatars.githubusercontent.com/u/3636186?v=3","gravatar_id":"","url":"https://api.github.com/users/makersacademy","html_url":"https://github.com/makersacademy","followers_url":"https://api.github.com/users/makersacademy/followers","following_url":"https://api.github.com/users/makersacademy/following{/other_user}","gists_url":"https://api.github.com/users/makersacademy/gists{/gist_id}","starred_url":"https://api.github.com/users/makersacademy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makersacademy/subscriptions","organizations_url":"https://api.github.com/users/makersacademy/orgs","repos_url":"https://api.github.com/users/makersacademy/repos","events_url":"https://api.github.com/users/makersacademy/events{/privacy}","received_events_url":"https://api.github.com/users/makersacademy/received_events","type":"Organization","site_admin":false},"repo":{"id":27006066,"name":"rps-challenge","full_name":"makersacademy/rps-challenge","owner":{"login":"makersacademy","id":3636186,"avatar_url":"https://avatars.githubusercontent.com/u/3636186?v=3","gravatar_id":"","url":"https://api.github.com/users/makersacademy","html_url":"https://github.com/makersacademy","followers_url":"https://api.github.com/users/makersacademy/followers","following_url":"https://api.github.com/users/makersacademy/following{/other_user}","gists_url":"https://api.github.com/users/makersacademy/gists{/gist_id}","starred_url":"https://api.github.com/users/makersacademy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makersacademy/subscriptions","organizations_url":"https://api.github.com/users/makersacademy/orgs","repos_url":"https://api.github.com/users/makersacademy/repos","events_url":"https://api.github.com/users/makersacademy/events{/privacy}","received_events_url":"https://api.github.com/users/makersacademy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/makersacademy/rps-challenge","description":"Create the Rock Paper Scissors Game","fork":false,"url":"https://api.github.com/repos/makersacademy/rps-challenge","forks_url":"https://api.github.com/repos/makersacademy/rps-challenge/forks","keys_url":"https://api.github.com/repos/makersacademy/rps-challenge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/makersacademy/rps-challenge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/makersacademy/rps-challenge/teams","hooks_url":"https://api.github.com/repos/makersacademy/rps-challenge/hooks","issue_events_url":"https://api.github.com/repos/makersacademy/rps-challenge/issues/events{/number}","events_url":"https://api.github.com/repos/makersacademy/rps-challenge/events","assignees_url":"https://api.github.com/repos/makersacademy/rps-challenge/assignees{/user}","branches_url":"https://api.github.com/repos/makersacademy/rps-challenge/branches{/branch}","tags_url":"https://api.github.com/repos/makersacademy/rps-challenge/tags","blobs_url":"https://api.github.com/repos/makersacademy/rps-challenge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/makersacademy/rps-challenge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/makersacademy/rps-challenge/git/refs{/sha}","trees_url":"https://api.github.com/repos/makersacademy/rps-challenge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/makersacademy/rps-challenge/statuses/{sha}","languages_url":"https://api.github.com/repos/makersacademy/rps-challenge/languages","stargazers_url":"https://api.github.com/repos/makersacademy/rps-challenge/stargazers","contributors_url":"https://api.github.com/repos/makersacademy/rps-challenge/contributors","subscribers_url":"https://api.github.com/repos/makersacademy/rps-challenge/subscribers","subscription_url":"https://api.github.com/repos/makersacademy/rps-challenge/subscription","commits_url":"https://api.github.com/repos/makersacademy/rps-challenge/commits{/sha}","git_commits_url":"https://api.github.com/repos/makersacademy/rps-challenge/git/commits{/sha}","comments_url":"https://api.github.com/repos/makersacademy/rps-challenge/comments{/number}","issue_comment_url":"https://api.github.com/repos/makersacademy/rps-challenge/issues/comments{/number}","contents_url":"https://api.github.com/repos/makersacademy/rps-challenge/contents/{+path}","compare_url":"https://api.github.com/repos/makersacademy/rps-challenge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/makersacademy/rps-challenge/merges","archive_url":"https://api.github.com/repos/makersacademy/rps-challenge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/makersacademy/rps-challenge/downloads","issues_url":"https://api.github.com/repos/makersacademy/rps-challenge/issues{/number}","pulls_url":"https://api.github.com/repos/makersacademy/rps-challenge/pulls{/number}","milestones_url":"https://api.github.com/repos/makersacademy/rps-challenge/milestones{/number}","notifications_url":"https://api.github.com/repos/makersacademy/rps-challenge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/makersacademy/rps-challenge/labels{/name}","releases_url":"https://api.github.com/repos/makersacademy/rps-challenge/releases{/id}","created_at":"2014-11-22T17:15:17Z","updated_at":"2015-02-20T10:05:38Z","pushed_at":"2015-02-21T08:04:34Z","git_url":"git://github.com/makersacademy/rps-challenge.git","ssh_url":"git@github.com:makersacademy/rps-challenge.git","clone_url":"https://github.com/makersacademy/rps-challenge.git","svn_url":"https://github.com/makersacademy/rps-challenge","homepage":null,"size":129,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":23,"forks":25,"open_issues":23,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/makersacademy/rps-challenge/pulls/13"},"html":{"href":"https://github.com/makersacademy/rps-challenge/pull/13"},"issue":{"href":"https://api.github.com/repos/makersacademy/rps-challenge/issues/13"},"comments":{"href":"https://api.github.com/repos/makersacademy/rps-challenge/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/makersacademy/rps-challenge/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/makersacademy/rps-challenge/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/makersacademy/rps-challenge/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/makersacademy/rps-challenge/statuses/cd3b2d8e17b5376b35278466bb5d3bfca6ba9b1b"}}}}