{"action":"created","comment":{"url":"https://api.github.com/repos/sprky/sprky_chess/pulls/comments/27135638","id":27135638,"diff_hunk":"@@ -4,19 +4,7 @@ def legal_move?(x, y)\n   end\r\n \r\n   def obstructed_move?(x,y)\r\n-  \t\r\n-    return true if obstructed_diagonally?(x, y)\r\n-    \r\n-    # capture logic  - I think this can get refactored into a method used by all the pieces except pawn\r\n-    destination_obstruction = game.obstruction(x, y) # is there something at the destination?\r\n-    if destination_obstruction && destination_obstruction.color == self.color\r\n-      # yes and it's the same color - it's an obstruction\r\n-      return true\r\n-    elsif destination_obstruction && destination_obstruction.color != self.color\r\n-      # yes but it's a different color - capture it\r\n-      # destination_obstruction.mark_captured\r\n-      return false # no obstruction, piece should move there.\r\n-    end\r\n+  \treturn true if obstructed_diagonally?(x, y)\r","path":"app/models/bishop.rb","position":17,"original_position":17,"commit_id":"239f12474d01c1089ece9c2ff42d45d10062d6be","original_commit_id":"239f12474d01c1089ece9c2ff42d45d10062d6be","user":{"login":"johnellison","id":5806135,"avatar_url":"https://avatars.githubusercontent.com/u/5806135?v=3","gravatar_id":"","url":"https://api.github.com/users/johnellison","html_url":"https://github.com/johnellison","followers_url":"https://api.github.com/users/johnellison/followers","following_url":"https://api.github.com/users/johnellison/following{/other_user}","gists_url":"https://api.github.com/users/johnellison/gists{/gist_id}","starred_url":"https://api.github.com/users/johnellison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnellison/subscriptions","organizations_url":"https://api.github.com/users/johnellison/orgs","repos_url":"https://api.github.com/users/johnellison/repos","events_url":"https://api.github.com/users/johnellison/events{/privacy}","received_events_url":"https://api.github.com/users/johnellison/received_events","type":"User","site_admin":false},"body":"Since it is just one statement here we can simply call `obstructed_diagonally?(x, y)`.","created_at":"2015-03-25T16:04:38Z","updated_at":"2015-03-25T16:04:38Z","html_url":"https://github.com/sprky/sprky_chess/pull/51#discussion_r27135638","pull_request_url":"https://api.github.com/repos/sprky/sprky_chess/pulls/51","_links":{"self":{"href":"https://api.github.com/repos/sprky/sprky_chess/pulls/comments/27135638"},"html":{"href":"https://github.com/sprky/sprky_chess/pull/51#discussion_r27135638"},"pull_request":{"href":"https://api.github.com/repos/sprky/sprky_chess/pulls/51"}}},"pull_request":{"url":"https://api.github.com/repos/sprky/sprky_chess/pulls/51","id":31842292,"html_url":"https://github.com/sprky/sprky_chess/pull/51","diff_url":"https://github.com/sprky/sprky_chess/pull/51.diff","patch_url":"https://github.com/sprky/sprky_chess/pull/51.patch","issue_url":"https://api.github.com/repos/sprky/sprky_chess/issues/51","number":51,"state":"open","locked":false,"title":"Refactor valid move and pass tests","user":{"login":"washburnad","id":10605900,"avatar_url":"https://avatars.githubusercontent.com/u/10605900?v=3","gravatar_id":"","url":"https://api.github.com/users/washburnad","html_url":"https://github.com/washburnad","followers_url":"https://api.github.com/users/washburnad/followers","following_url":"https://api.github.com/users/washburnad/following{/other_user}","gists_url":"https://api.github.com/users/washburnad/gists{/gist_id}","starred_url":"https://api.github.com/users/washburnad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/washburnad/subscriptions","organizations_url":"https://api.github.com/users/washburnad/orgs","repos_url":"https://api.github.com/users/washburnad/repos","events_url":"https://api.github.com/users/washburnad/events{/privacy}","received_events_url":"https://api.github.com/users/washburnad/received_events","type":"User","site_admin":false},"body":"@johnellison @hsinkoff @MCHLWRRN \r\n\r\nRefactored valid_move? as discussed in the Trello slide @hsinkoff made. - please provide feedback\r\nImplemented two new piece methods, nil_move?(x, y) and destination_obstructed?(x, y)\r\nAlphabetized piece.rb methods\r\nTweaked many of the existing piece tests for a number of reasons -\r\n1. test was titled check legal move but was calling valid_move?\r\n2. test was titled check obstructed move but looked at destination\r\n3. added game_id to some tests which required piece look up (destination_obstructed called)\r\n\r\nAdditional testing should be considered before merging.\r\n\r\nI added a PR because I couldn't find a way to comment on an entire branch, but this PR isn't ready for prime time","created_at":"2015-03-24T16:13:26Z","updated_at":"2015-03-25T16:04:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5a4299e226cff7e1efa341708e512a0114ed820c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sprky/sprky_chess/pulls/51/commits","review_comments_url":"https://api.github.com/repos/sprky/sprky_chess/pulls/51/comments","review_comment_url":"https://api.github.com/repos/sprky/sprky_chess/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sprky/sprky_chess/issues/51/comments","statuses_url":"https://api.github.com/repos/sprky/sprky_chess/statuses/239f12474d01c1089ece9c2ff42d45d10062d6be","head":{"label":"sprky:refactor-valid-move-methods","ref":"refactor-valid-move-methods","sha":"239f12474d01c1089ece9c2ff42d45d10062d6be","user":{"login":"sprky","id":11095994,"avatar_url":"https://avatars.githubusercontent.com/u/11095994?v=3","gravatar_id":"","url":"https://api.github.com/users/sprky","html_url":"https://github.com/sprky","followers_url":"https://api.github.com/users/sprky/followers","following_url":"https://api.github.com/users/sprky/following{/other_user}","gists_url":"https://api.github.com/users/sprky/gists{/gist_id}","starred_url":"https://api.github.com/users/sprky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sprky/subscriptions","organizations_url":"https://api.github.com/users/sprky/orgs","repos_url":"https://api.github.com/users/sprky/repos","events_url":"https://api.github.com/users/sprky/events{/privacy}","received_events_url":"https://api.github.com/users/sprky/received_events","type":"Organization","site_admin":false},"repo":{"id":31082633,"name":"sprky_chess","full_name":"sprky/sprky_chess","owner":{"login":"sprky","id":11095994,"avatar_url":"https://avatars.githubusercontent.com/u/11095994?v=3","gravatar_id":"","url":"https://api.github.com/users/sprky","html_url":"https://github.com/sprky","followers_url":"https://api.github.com/users/sprky/followers","following_url":"https://api.github.com/users/sprky/following{/other_user}","gists_url":"https://api.github.com/users/sprky/gists{/gist_id}","starred_url":"https://api.github.com/users/sprky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sprky/subscriptions","organizations_url":"https://api.github.com/users/sprky/orgs","repos_url":"https://api.github.com/users/sprky/repos","events_url":"https://api.github.com/users/sprky/events{/privacy}","received_events_url":"https://api.github.com/users/sprky/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sprky/sprky_chess","description":"Sparky Chess app for Firehose group project","fork":false,"url":"https://api.github.com/repos/sprky/sprky_chess","forks_url":"https://api.github.com/repos/sprky/sprky_chess/forks","keys_url":"https://api.github.com/repos/sprky/sprky_chess/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sprky/sprky_chess/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sprky/sprky_chess/teams","hooks_url":"https://api.github.com/repos/sprky/sprky_chess/hooks","issue_events_url":"https://api.github.com/repos/sprky/sprky_chess/issues/events{/number}","events_url":"https://api.github.com/repos/sprky/sprky_chess/events","assignees_url":"https://api.github.com/repos/sprky/sprky_chess/assignees{/user}","branches_url":"https://api.github.com/repos/sprky/sprky_chess/branches{/branch}","tags_url":"https://api.github.com/repos/sprky/sprky_chess/tags","blobs_url":"https://api.github.com/repos/sprky/sprky_chess/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sprky/sprky_chess/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sprky/sprky_chess/git/refs{/sha}","trees_url":"https://api.github.com/repos/sprky/sprky_chess/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sprky/sprky_chess/statuses/{sha}","languages_url":"https://api.github.com/repos/sprky/sprky_chess/languages","stargazers_url":"https://api.github.com/repos/sprky/sprky_chess/stargazers","contributors_url":"https://api.github.com/repos/sprky/sprky_chess/contributors","subscribers_url":"https://api.github.com/repos/sprky/sprky_chess/subscribers","subscription_url":"https://api.github.com/repos/sprky/sprky_chess/subscription","commits_url":"https://api.github.com/repos/sprky/sprky_chess/commits{/sha}","git_commits_url":"https://api.github.com/repos/sprky/sprky_chess/git/commits{/sha}","comments_url":"https://api.github.com/repos/sprky/sprky_chess/comments{/number}","issue_comment_url":"https://api.github.com/repos/sprky/sprky_chess/issues/comments{/number}","contents_url":"https://api.github.com/repos/sprky/sprky_chess/contents/{+path}","compare_url":"https://api.github.com/repos/sprky/sprky_chess/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sprky/sprky_chess/merges","archive_url":"https://api.github.com/repos/sprky/sprky_chess/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sprky/sprky_chess/downloads","issues_url":"https://api.github.com/repos/sprky/sprky_chess/issues{/number}","pulls_url":"https://api.github.com/repos/sprky/sprky_chess/pulls{/number}","milestones_url":"https://api.github.com/repos/sprky/sprky_chess/milestones{/number}","notifications_url":"https://api.github.com/repos/sprky/sprky_chess/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sprky/sprky_chess/labels{/name}","releases_url":"https://api.github.com/repos/sprky/sprky_chess/releases{/id}","created_at":"2015-02-20T20:01:15Z","updated_at":"2015-03-23T18:48:56Z","pushed_at":"2015-03-24T19:20:30Z","git_url":"git://github.com/sprky/sprky_chess.git","ssh_url":"git@github.com:sprky/sprky_chess.git","clone_url":"https://github.com/sprky/sprky_chess.git","svn_url":"https://github.com/sprky/sprky_chess","homepage":"http://sprky.herokuapp.com","size":820,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"base":{"label":"sprky:master","ref":"master","sha":"1db10ca40d0d2cdaeecabd637754451b5c6e5e12","user":{"login":"sprky","id":11095994,"avatar_url":"https://avatars.githubusercontent.com/u/11095994?v=3","gravatar_id":"","url":"https://api.github.com/users/sprky","html_url":"https://github.com/sprky","followers_url":"https://api.github.com/users/sprky/followers","following_url":"https://api.github.com/users/sprky/following{/other_user}","gists_url":"https://api.github.com/users/sprky/gists{/gist_id}","starred_url":"https://api.github.com/users/sprky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sprky/subscriptions","organizations_url":"https://api.github.com/users/sprky/orgs","repos_url":"https://api.github.com/users/sprky/repos","events_url":"https://api.github.com/users/sprky/events{/privacy}","received_events_url":"https://api.github.com/users/sprky/received_events","type":"Organization","site_admin":false},"repo":{"id":31082633,"name":"sprky_chess","full_name":"sprky/sprky_chess","owner":{"login":"sprky","id":11095994,"avatar_url":"https://avatars.githubusercontent.com/u/11095994?v=3","gravatar_id":"","url":"https://api.github.com/users/sprky","html_url":"https://github.com/sprky","followers_url":"https://api.github.com/users/sprky/followers","following_url":"https://api.github.com/users/sprky/following{/other_user}","gists_url":"https://api.github.com/users/sprky/gists{/gist_id}","starred_url":"https://api.github.com/users/sprky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sprky/subscriptions","organizations_url":"https://api.github.com/users/sprky/orgs","repos_url":"https://api.github.com/users/sprky/repos","events_url":"https://api.github.com/users/sprky/events{/privacy}","received_events_url":"https://api.github.com/users/sprky/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sprky/sprky_chess","description":"Sparky Chess app for Firehose group project","fork":false,"url":"https://api.github.com/repos/sprky/sprky_chess","forks_url":"https://api.github.com/repos/sprky/sprky_chess/forks","keys_url":"https://api.github.com/repos/sprky/sprky_chess/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sprky/sprky_chess/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sprky/sprky_chess/teams","hooks_url":"https://api.github.com/repos/sprky/sprky_chess/hooks","issue_events_url":"https://api.github.com/repos/sprky/sprky_chess/issues/events{/number}","events_url":"https://api.github.com/repos/sprky/sprky_chess/events","assignees_url":"https://api.github.com/repos/sprky/sprky_chess/assignees{/user}","branches_url":"https://api.github.com/repos/sprky/sprky_chess/branches{/branch}","tags_url":"https://api.github.com/repos/sprky/sprky_chess/tags","blobs_url":"https://api.github.com/repos/sprky/sprky_chess/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sprky/sprky_chess/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sprky/sprky_chess/git/refs{/sha}","trees_url":"https://api.github.com/repos/sprky/sprky_chess/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sprky/sprky_chess/statuses/{sha}","languages_url":"https://api.github.com/repos/sprky/sprky_chess/languages","stargazers_url":"https://api.github.com/repos/sprky/sprky_chess/stargazers","contributors_url":"https://api.github.com/repos/sprky/sprky_chess/contributors","subscribers_url":"https://api.github.com/repos/sprky/sprky_chess/subscribers","subscription_url":"https://api.github.com/repos/sprky/sprky_chess/subscription","commits_url":"https://api.github.com/repos/sprky/sprky_chess/commits{/sha}","git_commits_url":"https://api.github.com/repos/sprky/sprky_chess/git/commits{/sha}","comments_url":"https://api.github.com/repos/sprky/sprky_chess/comments{/number}","issue_comment_url":"https://api.github.com/repos/sprky/sprky_chess/issues/comments{/number}","contents_url":"https://api.github.com/repos/sprky/sprky_chess/contents/{+path}","compare_url":"https://api.github.com/repos/sprky/sprky_chess/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sprky/sprky_chess/merges","archive_url":"https://api.github.com/repos/sprky/sprky_chess/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sprky/sprky_chess/downloads","issues_url":"https://api.github.com/repos/sprky/sprky_chess/issues{/number}","pulls_url":"https://api.github.com/repos/sprky/sprky_chess/pulls{/number}","milestones_url":"https://api.github.com/repos/sprky/sprky_chess/milestones{/number}","notifications_url":"https://api.github.com/repos/sprky/sprky_chess/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sprky/sprky_chess/labels{/name}","releases_url":"https://api.github.com/repos/sprky/sprky_chess/releases{/id}","created_at":"2015-02-20T20:01:15Z","updated_at":"2015-03-23T18:48:56Z","pushed_at":"2015-03-24T19:20:30Z","git_url":"git://github.com/sprky/sprky_chess.git","ssh_url":"git@github.com:sprky/sprky_chess.git","clone_url":"https://github.com/sprky/sprky_chess.git","svn_url":"https://github.com/sprky/sprky_chess","homepage":"http://sprky.herokuapp.com","size":820,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sprky/sprky_chess/pulls/51"},"html":{"href":"https://github.com/sprky/sprky_chess/pull/51"},"issue":{"href":"https://api.github.com/repos/sprky/sprky_chess/issues/51"},"comments":{"href":"https://api.github.com/repos/sprky/sprky_chess/issues/51/comments"},"review_comments":{"href":"https://api.github.com/repos/sprky/sprky_chess/pulls/51/comments"},"review_comment":{"href":"https://api.github.com/repos/sprky/sprky_chess/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sprky/sprky_chess/pulls/51/commits"},"statuses":{"href":"https://api.github.com/repos/sprky/sprky_chess/statuses/239f12474d01c1089ece9c2ff42d45d10062d6be"}}}}