{"action":"created","comment":{"url":"https://api.github.com/repos/sprky/sprky_chess/pulls/comments/26357383","id":26357383,"diff_hunk":"@@ -9,36 +9,43 @@ class Game < ActiveRecord::Base\n \n   def initialize_board!\n   \t#white pawns\n-  \tPawn.create(:player_id => white_player_id, :game_id => self.id, :x_position => 0, :y_position => 1, :color => 1)\n-  \tPawn.create(:player_id => white_player_id, :game_id => self.id, :x_position => 1, :y_position => 1, :color => 1)\n-  \tPawn.create(:player_id => white_player_id, :game_id => self.id, :x_position => 2, :y_position => 1, :color => 1)\n-  \tPawn.create(:player_id => white_player_id, :game_id => self.id, :x_position => 3, :y_position => 1, :color => 1)\n-  \tPawn.create(:player_id => white_player_id, :game_id => self.id, :x_position => 4, :y_position => 1, :color => 1)\n-  \tPawn.create(:player_id => white_player_id, :game_id => self.id, :x_position => 5, :y_position => 1, :color => 1)\n-  \tPawn.create(:player_id => white_player_id, :game_id => self.id, :x_position => 6, :y_position => 1, :color => 1)\n-  \tPawn.create(:player_id => white_player_id, :game_id => self.id, :x_position => 7, :y_position => 1, :color => 1)\n+    (0..7).each do |i|\n+      Pawn.create(\n+        player_id: white_player_id,\n+        game_id: self.id,\n+        x_position: i,\n+        y_position: 1,\n+        color: 1\n+        )\n+    end\n+  \t\n   \t#white rooks\n   \tRook.create(:player_id => white_player_id, :game_id => self.id, :x_position => 0, :y_position => 0, :color => 1)\n   \tRook.create(:player_id => white_player_id, :game_id => self.id, :x_position => 7, :y_position => 0, :color => 1)\n+\n   \t#white knights\n   \tKnight.create(:player_id => white_player_id, :game_id => self.id, :x_position => 1, :y_position => 0, :color => 1)\n   \tKnight.create(:player_id => white_player_id, :game_id => self.id, :x_position => 6, :y_position => 0, :color => 1)\n-  \t#white bishops\n+  \t\n+    #white bishops","path":"app/models/game.rb","position":31,"original_position":31,"commit_id":"f446a7b7170fdc053002cf24ea244aa65afe53a3","original_commit_id":"f446a7b7170fdc053002cf24ea244aa65afe53a3","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Incorrect indentation detected (column 4 instead of 3).<br>Missing space after #.","created_at":"2015-03-13T00:32:09Z","updated_at":"2015-03-13T00:32:09Z","html_url":"https://github.com/sprky/sprky_chess/pull/22#discussion_r26357383","pull_request_url":"https://api.github.com/repos/sprky/sprky_chess/pulls/22","_links":{"self":{"href":"https://api.github.com/repos/sprky/sprky_chess/pulls/comments/26357383"},"html":{"href":"https://github.com/sprky/sprky_chess/pull/22#discussion_r26357383"},"pull_request":{"href":"https://api.github.com/repos/sprky/sprky_chess/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/sprky/sprky_chess/pulls/22","id":31091239,"html_url":"https://github.com/sprky/sprky_chess/pull/22","diff_url":"https://github.com/sprky/sprky_chess/pull/22.diff","patch_url":"https://github.com/sprky/sprky_chess/pull/22.patch","issue_url":"https://api.github.com/repos/sprky/sprky_chess/issues/22","number":22,"state":"open","locked":false,"title":"Foundational valid_move? logic AND refactor Piece  ","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":"1. Implement the foundational logic for determining whether a move is valid / legal. \r\n  - a 'valid' move is called on the Piece. the move must be :\r\n    - on the board\r\n    - 'legal' (according to each individual piece type)\r\n  - A 'legal' move has unique conditions depending on each piece type.\r\n  - Implement example `legal_move?` method for the following piece types:\r\n    - Pawn\r\n    - Rook\r\n  - Write tests\r\n2. Refactor Piece\r\n  - remove `initialize` method for each piece\r\n  - add `set_default_images` method to Piece model\r\n  - call `set_default_images` using `after_initialize` hook\r\n  - add `color_name` method to Piece model - determines color as a string depending on piece.color\r\n  - dynamically generate `piece.symbol`\r\n  - use a loop to create pawns for the `initialize_board!` method\r\n  \r\n\r\n\r\n\r\n","created_at":"2015-03-13T00:32:02Z","updated_at":"2015-03-13T00:32:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"38a562115e073a459c90e4a53539c3653a1892c3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sprky/sprky_chess/pulls/22/commits","review_comments_url":"https://api.github.com/repos/sprky/sprky_chess/pulls/22/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/22/comments","statuses_url":"https://api.github.com/repos/sprky/sprky_chess/statuses/f446a7b7170fdc053002cf24ea244aa65afe53a3","head":{"label":"sprky:valid-move-and-piece-refactor","ref":"valid-move-and-piece-refactor","sha":"f446a7b7170fdc053002cf24ea244aa65afe53a3","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-12T16:12:43Z","pushed_at":"2015-03-13T00:19:46Z","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":null,"size":524,"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":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"sprky:master","ref":"master","sha":"b7ccb91652cd28af8c43464522fe96f3bcbb8a61","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-12T16:12:43Z","pushed_at":"2015-03-13T00:19:46Z","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":null,"size":524,"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":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sprky/sprky_chess/pulls/22"},"html":{"href":"https://github.com/sprky/sprky_chess/pull/22"},"issue":{"href":"https://api.github.com/repos/sprky/sprky_chess/issues/22"},"comments":{"href":"https://api.github.com/repos/sprky/sprky_chess/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/sprky/sprky_chess/pulls/22/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/22/commits"},"statuses":{"href":"https://api.github.com/repos/sprky/sprky_chess/statuses/f446a7b7170fdc053002cf24ea244aa65afe53a3"}}}}