{"action":"created","comment":{"url":"https://api.github.com/repos/MollieS/TicTacToe/pulls/comments/64755664","id":64755664,"diff_hunk":"@@ -30,26 +31,27 @@ public Marks getMark() {\n     }\n \n     private int negamax(Board board, int depth, int colour, int alpha, int beta) {\n-        if (board.isFinished()) return score(board, depth) * colour;\n+        if (board.isFinished()) { return score(board, depth) * colour; }\n         int bestValue = -999;\n         for (int move : board.availableMoves()) {\n-            makeMove(board, colour, move);\n+            board = makeMove(board, colour, move);\n             int value = -negamax(board, depth + 1, -colour, -beta, -alpha);\n             board.clear(move);\n             bestValue = Math.max(value, bestValue);\n-            if (depth == 0 && bestValue > alpha) scores.put(move, bestValue);\n+            if (depth == 0 && bestValue > alpha) { scores.put(move, bestValue); }\n             alpha = Math.max(alpha, bestValue);\n-            if (alpha >= beta) return beta;\n+            if (alpha >= beta) { return beta; }\n         }\n         return bestValue;\n     }\n \n-    private void makeMove(Board board, int colour, int move) {\n+    private Board makeMove(Board board, int colour, int move) {","path":"src/main/java/ttt/players/PerfectPlayer.java","position":48,"original_position":48,"commit_id":"f5227054749205a3e83e91eec1905734ce98f45e","original_commit_id":"f5227054749205a3e83e91eec1905734ce98f45e","user":{"login":"MollieS","id":11349388,"avatar_url":"https://avatars.githubusercontent.com/u/11349388?v=3","gravatar_id":"","url":"https://api.github.com/users/MollieS","html_url":"https://github.com/MollieS","followers_url":"https://api.github.com/users/MollieS/followers","following_url":"https://api.github.com/users/MollieS/following{/other_user}","gists_url":"https://api.github.com/users/MollieS/gists{/gist_id}","starred_url":"https://api.github.com/users/MollieS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MollieS/subscriptions","organizations_url":"https://api.github.com/users/MollieS/orgs","repos_url":"https://api.github.com/users/MollieS/repos","events_url":"https://api.github.com/users/MollieS/events{/privacy}","received_events_url":"https://api.github.com/users/MollieS/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: [Avoid reassigning parameters such as 'board'](https://www.codacy.com/app/mollie-c-stephenson/TicTacToe/file/2639515826/issues/source?bid=3284885&fileBranchId=3321126#l48)","created_at":"2016-05-26T14:30:11Z","updated_at":"2016-05-26T14:30:11Z","html_url":"https://github.com/MollieS/TicTacToe/pull/13#discussion_r64755664","pull_request_url":"https://api.github.com/repos/MollieS/TicTacToe/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/MollieS/TicTacToe/pulls/comments/64755664"},"html":{"href":"https://github.com/MollieS/TicTacToe/pull/13#discussion_r64755664"},"pull_request":{"href":"https://api.github.com/repos/MollieS/TicTacToe/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/MollieS/TicTacToe/pulls/13","id":71565255,"html_url":"https://github.com/MollieS/TicTacToe/pull/13","diff_url":"https://github.com/MollieS/TicTacToe/pull/13.diff","patch_url":"https://github.com/MollieS/TicTacToe/pull/13.patch","issue_url":"https://api.github.com/repos/MollieS/TicTacToe/issues/13","number":13,"state":"open","locked":false,"title":"Immutable board","user":{"login":"MollieS","id":11349388,"avatar_url":"https://avatars.githubusercontent.com/u/11349388?v=3","gravatar_id":"","url":"https://api.github.com/users/MollieS","html_url":"https://github.com/MollieS","followers_url":"https://api.github.com/users/MollieS/followers","following_url":"https://api.github.com/users/MollieS/following{/other_user}","gists_url":"https://api.github.com/users/MollieS/gists{/gist_id}","starred_url":"https://api.github.com/users/MollieS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MollieS/subscriptions","organizations_url":"https://api.github.com/users/MollieS/orgs","repos_url":"https://api.github.com/users/MollieS/repos","events_url":"https://api.github.com/users/MollieS/events{/privacy}","received_events_url":"https://api.github.com/users/MollieS/received_events","type":"User","site_admin":false},"body":"Makes board immutable - placeMark() now returns a new board","created_at":"2016-05-26T14:28:35Z","updated_at":"2016-05-26T14:30:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3463977990e1c08e444af1bed5f90f1bc0a1b8f4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/MollieS/TicTacToe/pulls/13/commits","review_comments_url":"https://api.github.com/repos/MollieS/TicTacToe/pulls/13/comments","review_comment_url":"https://api.github.com/repos/MollieS/TicTacToe/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MollieS/TicTacToe/issues/13/comments","statuses_url":"https://api.github.com/repos/MollieS/TicTacToe/statuses/f5227054749205a3e83e91eec1905734ce98f45e","head":{"label":"MollieS:immutableboard","ref":"immutableboard","sha":"f5227054749205a3e83e91eec1905734ce98f45e","user":{"login":"MollieS","id":11349388,"avatar_url":"https://avatars.githubusercontent.com/u/11349388?v=3","gravatar_id":"","url":"https://api.github.com/users/MollieS","html_url":"https://github.com/MollieS","followers_url":"https://api.github.com/users/MollieS/followers","following_url":"https://api.github.com/users/MollieS/following{/other_user}","gists_url":"https://api.github.com/users/MollieS/gists{/gist_id}","starred_url":"https://api.github.com/users/MollieS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MollieS/subscriptions","organizations_url":"https://api.github.com/users/MollieS/orgs","repos_url":"https://api.github.com/users/MollieS/repos","events_url":"https://api.github.com/users/MollieS/events{/privacy}","received_events_url":"https://api.github.com/users/MollieS/received_events","type":"User","site_admin":false},"repo":{"id":57204752,"name":"TicTacToe","full_name":"MollieS/TicTacToe","owner":{"login":"MollieS","id":11349388,"avatar_url":"https://avatars.githubusercontent.com/u/11349388?v=3","gravatar_id":"","url":"https://api.github.com/users/MollieS","html_url":"https://github.com/MollieS","followers_url":"https://api.github.com/users/MollieS/followers","following_url":"https://api.github.com/users/MollieS/following{/other_user}","gists_url":"https://api.github.com/users/MollieS/gists{/gist_id}","starred_url":"https://api.github.com/users/MollieS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MollieS/subscriptions","organizations_url":"https://api.github.com/users/MollieS/orgs","repos_url":"https://api.github.com/users/MollieS/repos","events_url":"https://api.github.com/users/MollieS/events{/privacy}","received_events_url":"https://api.github.com/users/MollieS/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MollieS/TicTacToe","description":"","fork":false,"url":"https://api.github.com/repos/MollieS/TicTacToe","forks_url":"https://api.github.com/repos/MollieS/TicTacToe/forks","keys_url":"https://api.github.com/repos/MollieS/TicTacToe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MollieS/TicTacToe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MollieS/TicTacToe/teams","hooks_url":"https://api.github.com/repos/MollieS/TicTacToe/hooks","issue_events_url":"https://api.github.com/repos/MollieS/TicTacToe/issues/events{/number}","events_url":"https://api.github.com/repos/MollieS/TicTacToe/events","assignees_url":"https://api.github.com/repos/MollieS/TicTacToe/assignees{/user}","branches_url":"https://api.github.com/repos/MollieS/TicTacToe/branches{/branch}","tags_url":"https://api.github.com/repos/MollieS/TicTacToe/tags","blobs_url":"https://api.github.com/repos/MollieS/TicTacToe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MollieS/TicTacToe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MollieS/TicTacToe/git/refs{/sha}","trees_url":"https://api.github.com/repos/MollieS/TicTacToe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MollieS/TicTacToe/statuses/{sha}","languages_url":"https://api.github.com/repos/MollieS/TicTacToe/languages","stargazers_url":"https://api.github.com/repos/MollieS/TicTacToe/stargazers","contributors_url":"https://api.github.com/repos/MollieS/TicTacToe/contributors","subscribers_url":"https://api.github.com/repos/MollieS/TicTacToe/subscribers","subscription_url":"https://api.github.com/repos/MollieS/TicTacToe/subscription","commits_url":"https://api.github.com/repos/MollieS/TicTacToe/commits{/sha}","git_commits_url":"https://api.github.com/repos/MollieS/TicTacToe/git/commits{/sha}","comments_url":"https://api.github.com/repos/MollieS/TicTacToe/comments{/number}","issue_comment_url":"https://api.github.com/repos/MollieS/TicTacToe/issues/comments{/number}","contents_url":"https://api.github.com/repos/MollieS/TicTacToe/contents/{+path}","compare_url":"https://api.github.com/repos/MollieS/TicTacToe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MollieS/TicTacToe/merges","archive_url":"https://api.github.com/repos/MollieS/TicTacToe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MollieS/TicTacToe/downloads","issues_url":"https://api.github.com/repos/MollieS/TicTacToe/issues{/number}","pulls_url":"https://api.github.com/repos/MollieS/TicTacToe/pulls{/number}","milestones_url":"https://api.github.com/repos/MollieS/TicTacToe/milestones{/number}","notifications_url":"https://api.github.com/repos/MollieS/TicTacToe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MollieS/TicTacToe/labels{/name}","releases_url":"https://api.github.com/repos/MollieS/TicTacToe/releases{/id}","deployments_url":"https://api.github.com/repos/MollieS/TicTacToe/deployments","created_at":"2016-04-27T10:23:48Z","updated_at":"2016-05-05T10:25:03Z","pushed_at":"2016-05-26T14:29:12Z","git_url":"git://github.com/MollieS/TicTacToe.git","ssh_url":"git@github.com:MollieS/TicTacToe.git","clone_url":"https://github.com/MollieS/TicTacToe.git","svn_url":"https://github.com/MollieS/TicTacToe","homepage":null,"size":1034,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"MollieS:master","ref":"master","sha":"ae03616fda3ab589d4b56762c7b2d43cb6108df5","user":{"login":"MollieS","id":11349388,"avatar_url":"https://avatars.githubusercontent.com/u/11349388?v=3","gravatar_id":"","url":"https://api.github.com/users/MollieS","html_url":"https://github.com/MollieS","followers_url":"https://api.github.com/users/MollieS/followers","following_url":"https://api.github.com/users/MollieS/following{/other_user}","gists_url":"https://api.github.com/users/MollieS/gists{/gist_id}","starred_url":"https://api.github.com/users/MollieS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MollieS/subscriptions","organizations_url":"https://api.github.com/users/MollieS/orgs","repos_url":"https://api.github.com/users/MollieS/repos","events_url":"https://api.github.com/users/MollieS/events{/privacy}","received_events_url":"https://api.github.com/users/MollieS/received_events","type":"User","site_admin":false},"repo":{"id":57204752,"name":"TicTacToe","full_name":"MollieS/TicTacToe","owner":{"login":"MollieS","id":11349388,"avatar_url":"https://avatars.githubusercontent.com/u/11349388?v=3","gravatar_id":"","url":"https://api.github.com/users/MollieS","html_url":"https://github.com/MollieS","followers_url":"https://api.github.com/users/MollieS/followers","following_url":"https://api.github.com/users/MollieS/following{/other_user}","gists_url":"https://api.github.com/users/MollieS/gists{/gist_id}","starred_url":"https://api.github.com/users/MollieS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MollieS/subscriptions","organizations_url":"https://api.github.com/users/MollieS/orgs","repos_url":"https://api.github.com/users/MollieS/repos","events_url":"https://api.github.com/users/MollieS/events{/privacy}","received_events_url":"https://api.github.com/users/MollieS/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MollieS/TicTacToe","description":"","fork":false,"url":"https://api.github.com/repos/MollieS/TicTacToe","forks_url":"https://api.github.com/repos/MollieS/TicTacToe/forks","keys_url":"https://api.github.com/repos/MollieS/TicTacToe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MollieS/TicTacToe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MollieS/TicTacToe/teams","hooks_url":"https://api.github.com/repos/MollieS/TicTacToe/hooks","issue_events_url":"https://api.github.com/repos/MollieS/TicTacToe/issues/events{/number}","events_url":"https://api.github.com/repos/MollieS/TicTacToe/events","assignees_url":"https://api.github.com/repos/MollieS/TicTacToe/assignees{/user}","branches_url":"https://api.github.com/repos/MollieS/TicTacToe/branches{/branch}","tags_url":"https://api.github.com/repos/MollieS/TicTacToe/tags","blobs_url":"https://api.github.com/repos/MollieS/TicTacToe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MollieS/TicTacToe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MollieS/TicTacToe/git/refs{/sha}","trees_url":"https://api.github.com/repos/MollieS/TicTacToe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MollieS/TicTacToe/statuses/{sha}","languages_url":"https://api.github.com/repos/MollieS/TicTacToe/languages","stargazers_url":"https://api.github.com/repos/MollieS/TicTacToe/stargazers","contributors_url":"https://api.github.com/repos/MollieS/TicTacToe/contributors","subscribers_url":"https://api.github.com/repos/MollieS/TicTacToe/subscribers","subscription_url":"https://api.github.com/repos/MollieS/TicTacToe/subscription","commits_url":"https://api.github.com/repos/MollieS/TicTacToe/commits{/sha}","git_commits_url":"https://api.github.com/repos/MollieS/TicTacToe/git/commits{/sha}","comments_url":"https://api.github.com/repos/MollieS/TicTacToe/comments{/number}","issue_comment_url":"https://api.github.com/repos/MollieS/TicTacToe/issues/comments{/number}","contents_url":"https://api.github.com/repos/MollieS/TicTacToe/contents/{+path}","compare_url":"https://api.github.com/repos/MollieS/TicTacToe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MollieS/TicTacToe/merges","archive_url":"https://api.github.com/repos/MollieS/TicTacToe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MollieS/TicTacToe/downloads","issues_url":"https://api.github.com/repos/MollieS/TicTacToe/issues{/number}","pulls_url":"https://api.github.com/repos/MollieS/TicTacToe/pulls{/number}","milestones_url":"https://api.github.com/repos/MollieS/TicTacToe/milestones{/number}","notifications_url":"https://api.github.com/repos/MollieS/TicTacToe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MollieS/TicTacToe/labels{/name}","releases_url":"https://api.github.com/repos/MollieS/TicTacToe/releases{/id}","deployments_url":"https://api.github.com/repos/MollieS/TicTacToe/deployments","created_at":"2016-04-27T10:23:48Z","updated_at":"2016-05-05T10:25:03Z","pushed_at":"2016-05-26T14:29:12Z","git_url":"git://github.com/MollieS/TicTacToe.git","ssh_url":"git@github.com:MollieS/TicTacToe.git","clone_url":"https://github.com/MollieS/TicTacToe.git","svn_url":"https://github.com/MollieS/TicTacToe","homepage":null,"size":1034,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MollieS/TicTacToe/pulls/13"},"html":{"href":"https://github.com/MollieS/TicTacToe/pull/13"},"issue":{"href":"https://api.github.com/repos/MollieS/TicTacToe/issues/13"},"comments":{"href":"https://api.github.com/repos/MollieS/TicTacToe/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/MollieS/TicTacToe/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/MollieS/TicTacToe/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MollieS/TicTacToe/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/MollieS/TicTacToe/statuses/f5227054749205a3e83e91eec1905734ce98f45e"}}}}
{"actor":{"display_login":"MollieS"}}