{"action":"created","comment":{"url":"https://api.github.com/repos/bozhidar-projects/git-introduction/pulls/comments/66223518","id":66223518,"diff_hunk":"@@ -0,0 +1,230 @@\n+package com.spaghettisoft.component.checkers;\r\n+\r\n+public final class Board {\r\n+\r\n+\tpublic final String oPawn = \"o\";\r\n+\tpublic final String xPawn = \"x\";\r\n+\r\n+\tprivate static final int ROW_COUNT = 8;\r\n+\tprivate static final int COLUMN_COUNT = 8;\r\n+\r\n+\tprivate boolean finished = false;\r\n+\r\n+\tpublic String[][] board;\r\n+\r\n+\tpublic Board() {\r\n+\t\tinitialize();\r\n+\t}\r\n+\r\n+\tpublic void draw() {\r\n+\r\n+\t\tint a = 0;\r\n+\t\tint b = 0;\r\n+\t\tSystem.out.printf(\"  0 1 2 3 4 5 6 7\\n\");\r\n+\t\tfor (int i = 0; i < board.length; i++) {\r\n+\r\n+\t\t\tSystem.out.print(a++);\r\n+\r\n+\t\t\tfor (int j = 0; j < board[i].length; j++) {\r\n+\t\t\t\tString sign = \" \";\r\n+\r\n+\t\t\t\tif (board[i][j] != null) {\r\n+\t\t\t\t\tsign = board[i][j];\r\n+\t\t\t\t}\r\n+\r\n+\t\t\t\tSystem.out.print(\"|\" + sign);\r\n+\t\t\t}\r\n+\r\n+\t\t\tSystem.out.println(\"|\" + b++);\r\n+\t\t}\r\n+\t\tSystem.out.printf(\"  0 1 2 3 4 5 6 7\\n\");\r\n+\t}\r\n+\r\n+\tpublic void move(Player player, Move move) {\r\n+\t\t// Move current player's pawn\r\n+\t\tboard[move.getTo().y][move.getTo().x] = board[move.getFrom().y][move.getFrom().x];\r\n+\t\tboard[move.getFrom().y][move.getFrom().x] = null;\r\n+\r\n+\t\t// Capture opponent player's pawn\r\n+\t\tPoint middlePoint = new Point((move.getTo().y - move.getFrom().y) / 2 + move.getFrom().y,\r\n+\t\t\t\t(move.getTo().x - move.getFrom().x) / 2 + move.getFrom().x);\r\n+\t\tboard[middlePoint.y][middlePoint.x] = null;\r\n+\r\n+\t\tif ((player.getDirection() == Direction.UP && move.getTo().y == 0)\r\n+\t\t\t\t|| (player.getDirection() == Direction.DOWN && move.getTo().y == 7)) {\r\n+\t\t\tboard[move.getTo().y][move.getTo().x] = board[move.getTo().y][move.getTo().x].toUpperCase();\r\n+\t\t}\r\n+\r\n+\t\tif (!hasDifferentPawns()) {\r","path":"code-name-taran/src/com/spaghettisoft/component/checkers/Board.java","position":58,"original_position":58,"commit_id":"7368ce784dfa27dd725ad8dfde98734eeb520138","original_commit_id":"7368ce784dfa27dd725ad8dfde98734eeb520138","user":{"login":"bozhidar-dimitrov","id":1126211,"avatar_url":"https://avatars.githubusercontent.com/u/1126211?v=3","gravatar_id":"","url":"https://api.github.com/users/bozhidar-dimitrov","html_url":"https://github.com/bozhidar-dimitrov","followers_url":"https://api.github.com/users/bozhidar-dimitrov/followers","following_url":"https://api.github.com/users/bozhidar-dimitrov/following{/other_user}","gists_url":"https://api.github.com/users/bozhidar-dimitrov/gists{/gist_id}","starred_url":"https://api.github.com/users/bozhidar-dimitrov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bozhidar-dimitrov/subscriptions","organizations_url":"https://api.github.com/users/bozhidar-dimitrov/orgs","repos_url":"https://api.github.com/users/bozhidar-dimitrov/repos","events_url":"https://api.github.com/users/bozhidar-dimitrov/events{/privacy}","received_events_url":"https://api.github.com/users/bozhidar-dimitrov/received_events","type":"User","site_admin":false},"body":"@VRaptor \r\nThis method does two things:\r\n1. Moves a pawn\r\n2. Prints endgame message and sets a flag to false. \r\n\r\nYou should avoid methods that do two things, unless the method job is to orchestrate other methods. The name \"move\" can confuse developers trying to understand the code : )\r\n\r\n","created_at":"2016-06-08T09:33:22Z","updated_at":"2016-06-08T09:33:22Z","html_url":"https://github.com/bozhidar-projects/git-introduction/pull/42#discussion_r66223518","pull_request_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/pulls/42","_links":{"self":{"href":"https://api.github.com/repos/bozhidar-projects/git-introduction/pulls/comments/66223518"},"html":{"href":"https://github.com/bozhidar-projects/git-introduction/pull/42#discussion_r66223518"},"pull_request":{"href":"https://api.github.com/repos/bozhidar-projects/git-introduction/pulls/42"}}},"pull_request":{"url":"https://api.github.com/repos/bozhidar-projects/git-introduction/pulls/42","id":72557834,"html_url":"https://github.com/bozhidar-projects/git-introduction/pull/42","diff_url":"https://github.com/bozhidar-projects/git-introduction/pull/42.diff","patch_url":"https://github.com/bozhidar-projects/git-introduction/pull/42.patch","issue_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/issues/42","number":42,"state":"closed","locked":false,"title":"Successfully merged changes.","user":{"login":"VRaptor","id":461860,"avatar_url":"https://avatars.githubusercontent.com/u/461860?v=3","gravatar_id":"","url":"https://api.github.com/users/VRaptor","html_url":"https://github.com/VRaptor","followers_url":"https://api.github.com/users/VRaptor/followers","following_url":"https://api.github.com/users/VRaptor/following{/other_user}","gists_url":"https://api.github.com/users/VRaptor/gists{/gist_id}","starred_url":"https://api.github.com/users/VRaptor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VRaptor/subscriptions","organizations_url":"https://api.github.com/users/VRaptor/orgs","repos_url":"https://api.github.com/users/VRaptor/repos","events_url":"https://api.github.com/users/VRaptor/events{/privacy}","received_events_url":"https://api.github.com/users/VRaptor/received_events","type":"User","site_admin":false},"body":"Final Project","created_at":"2016-06-03T19:29:27Z","updated_at":"2016-06-08T09:33:22Z","closed_at":"2016-06-03T19:30:42Z","merged_at":"2016-06-03T19:30:42Z","merge_commit_sha":"7a49b63aa6eedb15a767fbd127f736446592cb5f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/pulls/42/commits","review_comments_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/pulls/42/comments","review_comment_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/issues/42/comments","statuses_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/statuses/7368ce784dfa27dd725ad8dfde98734eeb520138","head":{"label":"bozhidar-projects:vmarinov-final-project","ref":"vmarinov-final-project","sha":"7368ce784dfa27dd725ad8dfde98734eeb520138","user":{"login":"bozhidar-projects","id":18416974,"avatar_url":"https://avatars.githubusercontent.com/u/18416974?v=3","gravatar_id":"","url":"https://api.github.com/users/bozhidar-projects","html_url":"https://github.com/bozhidar-projects","followers_url":"https://api.github.com/users/bozhidar-projects/followers","following_url":"https://api.github.com/users/bozhidar-projects/following{/other_user}","gists_url":"https://api.github.com/users/bozhidar-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/bozhidar-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bozhidar-projects/subscriptions","organizations_url":"https://api.github.com/users/bozhidar-projects/orgs","repos_url":"https://api.github.com/users/bozhidar-projects/repos","events_url":"https://api.github.com/users/bozhidar-projects/events{/privacy}","received_events_url":"https://api.github.com/users/bozhidar-projects/received_events","type":"Organization","site_admin":false},"repo":{"id":56048216,"name":"git-introduction","full_name":"bozhidar-projects/git-introduction","owner":{"login":"bozhidar-projects","id":18416974,"avatar_url":"https://avatars.githubusercontent.com/u/18416974?v=3","gravatar_id":"","url":"https://api.github.com/users/bozhidar-projects","html_url":"https://github.com/bozhidar-projects","followers_url":"https://api.github.com/users/bozhidar-projects/followers","following_url":"https://api.github.com/users/bozhidar-projects/following{/other_user}","gists_url":"https://api.github.com/users/bozhidar-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/bozhidar-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bozhidar-projects/subscriptions","organizations_url":"https://api.github.com/users/bozhidar-projects/orgs","repos_url":"https://api.github.com/users/bozhidar-projects/repos","events_url":"https://api.github.com/users/bozhidar-projects/events{/privacy}","received_events_url":"https://api.github.com/users/bozhidar-projects/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bozhidar-projects/git-introduction","description":"teaching git to new course students.","fork":false,"url":"https://api.github.com/repos/bozhidar-projects/git-introduction","forks_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/forks","keys_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/teams","hooks_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/hooks","issue_events_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/issues/events{/number}","events_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/events","assignees_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/assignees{/user}","branches_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/branches{/branch}","tags_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/tags","blobs_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/git/refs{/sha}","trees_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/statuses/{sha}","languages_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/languages","stargazers_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/stargazers","contributors_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/contributors","subscribers_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/subscribers","subscription_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/subscription","commits_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/commits{/sha}","git_commits_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/git/commits{/sha}","comments_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/comments{/number}","issue_comment_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/issues/comments{/number}","contents_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/contents/{+path}","compare_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/merges","archive_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/downloads","issues_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/issues{/number}","pulls_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/pulls{/number}","milestones_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/milestones{/number}","notifications_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/labels{/name}","releases_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/releases{/id}","deployments_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/deployments","created_at":"2016-04-12T09:11:27Z","updated_at":"2016-04-12T18:19:10Z","pushed_at":"2016-06-08T09:12:39Z","git_url":"git://github.com/bozhidar-projects/git-introduction.git","ssh_url":"git@github.com:bozhidar-projects/git-introduction.git","clone_url":"https://github.com/bozhidar-projects/git-introduction.git","svn_url":"https://github.com/bozhidar-projects/git-introduction","homepage":null,"size":515,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":0,"default_branch":"master"}},"base":{"label":"bozhidar-projects:java-advanced-course-19-2-2016","ref":"java-advanced-course-19-2-2016","sha":"b208ab4b9d79792315e1dd77043d3d48d8e7bfdf","user":{"login":"bozhidar-projects","id":18416974,"avatar_url":"https://avatars.githubusercontent.com/u/18416974?v=3","gravatar_id":"","url":"https://api.github.com/users/bozhidar-projects","html_url":"https://github.com/bozhidar-projects","followers_url":"https://api.github.com/users/bozhidar-projects/followers","following_url":"https://api.github.com/users/bozhidar-projects/following{/other_user}","gists_url":"https://api.github.com/users/bozhidar-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/bozhidar-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bozhidar-projects/subscriptions","organizations_url":"https://api.github.com/users/bozhidar-projects/orgs","repos_url":"https://api.github.com/users/bozhidar-projects/repos","events_url":"https://api.github.com/users/bozhidar-projects/events{/privacy}","received_events_url":"https://api.github.com/users/bozhidar-projects/received_events","type":"Organization","site_admin":false},"repo":{"id":56048216,"name":"git-introduction","full_name":"bozhidar-projects/git-introduction","owner":{"login":"bozhidar-projects","id":18416974,"avatar_url":"https://avatars.githubusercontent.com/u/18416974?v=3","gravatar_id":"","url":"https://api.github.com/users/bozhidar-projects","html_url":"https://github.com/bozhidar-projects","followers_url":"https://api.github.com/users/bozhidar-projects/followers","following_url":"https://api.github.com/users/bozhidar-projects/following{/other_user}","gists_url":"https://api.github.com/users/bozhidar-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/bozhidar-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bozhidar-projects/subscriptions","organizations_url":"https://api.github.com/users/bozhidar-projects/orgs","repos_url":"https://api.github.com/users/bozhidar-projects/repos","events_url":"https://api.github.com/users/bozhidar-projects/events{/privacy}","received_events_url":"https://api.github.com/users/bozhidar-projects/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bozhidar-projects/git-introduction","description":"teaching git to new course students.","fork":false,"url":"https://api.github.com/repos/bozhidar-projects/git-introduction","forks_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/forks","keys_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/teams","hooks_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/hooks","issue_events_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/issues/events{/number}","events_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/events","assignees_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/assignees{/user}","branches_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/branches{/branch}","tags_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/tags","blobs_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/git/refs{/sha}","trees_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/statuses/{sha}","languages_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/languages","stargazers_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/stargazers","contributors_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/contributors","subscribers_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/subscribers","subscription_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/subscription","commits_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/commits{/sha}","git_commits_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/git/commits{/sha}","comments_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/comments{/number}","issue_comment_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/issues/comments{/number}","contents_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/contents/{+path}","compare_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/merges","archive_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/downloads","issues_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/issues{/number}","pulls_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/pulls{/number}","milestones_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/milestones{/number}","notifications_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/labels{/name}","releases_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/releases{/id}","deployments_url":"https://api.github.com/repos/bozhidar-projects/git-introduction/deployments","created_at":"2016-04-12T09:11:27Z","updated_at":"2016-04-12T18:19:10Z","pushed_at":"2016-06-08T09:12:39Z","git_url":"git://github.com/bozhidar-projects/git-introduction.git","ssh_url":"git@github.com:bozhidar-projects/git-introduction.git","clone_url":"https://github.com/bozhidar-projects/git-introduction.git","svn_url":"https://github.com/bozhidar-projects/git-introduction","homepage":null,"size":515,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bozhidar-projects/git-introduction/pulls/42"},"html":{"href":"https://github.com/bozhidar-projects/git-introduction/pull/42"},"issue":{"href":"https://api.github.com/repos/bozhidar-projects/git-introduction/issues/42"},"comments":{"href":"https://api.github.com/repos/bozhidar-projects/git-introduction/issues/42/comments"},"review_comments":{"href":"https://api.github.com/repos/bozhidar-projects/git-introduction/pulls/42/comments"},"review_comment":{"href":"https://api.github.com/repos/bozhidar-projects/git-introduction/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bozhidar-projects/git-introduction/pulls/42/commits"},"statuses":{"href":"https://api.github.com/repos/bozhidar-projects/git-introduction/statuses/7368ce784dfa27dd725ad8dfde98734eeb520138"}}}}
{"actor":{"display_login":"bozhidar-dimitrov"}}