{"action":"created","comment":{"url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/pulls/comments/80219664","id":80219664,"diff_hunk":"@@ -3,51 +3,72 @@\n angular.module('app.player')\n \n .controller('playerCtrl', ['$localStorage', function($localStorage) {\n-\tvar vm = this;\n-\t//Array with all players ready to start the game\n-\tvm.players = [];\n-\t//Array with VIP players\n-\tvm.storagePlayers = [];\n-\n-\tvm.savedStorage = $localStorage.storagePlayers = $localStorage.storagePlayers || [];\n-\n-\t// load the VIP players in the table\n-\tif (vm.savedStorage !== null) {\n-\t\tvm.storagePlayers = vm.savedStorage;\n-\t}\n-\n-\t// add player with a name, and a initial score\n-\tvm.addPlayer = function() {\n-\t\tvm.players.push({ \n-\t\t\t'name':vm.name,\n-\t\t\t'totScore':501\n-\t\t});\n-  \tvm.name = ''; //clear input\n-\t  //save the last player\n-\t\tvar currentPlayerSaved = {};\n-\t  currentPlayerSaved = vm.players[vm.players.length - 1]; \n-\t  vm.storagePlayers.push(currentPlayerSaved); //add player in the VIP array\n-\t  $localStorage.players = vm.players;\n-\t  $localStorage.storagePlayers = vm.storagePlayers;\n-\t};\n-\n-\t//remove all players in the list\n-\tvm.removeAllPlayers = function() {\n-\t\tvm.players = [];\n-\t\t$localStorage.players = vm.players;\n-\t};\n-\n-\t// remove only the VIP player selected\n-\tvm.removePlayerStorage = function(friend) {\n-\t\tvar index = vm.storagePlayers.indexOf(friend);\n-\t\tvm.storagePlayers.splice(index, 1);\n-\t\t$localStorage.storagePlayers = vm.storagePlayers;\n-\t};\n-\n-\t//take the selected VIP player from table and put it in the list of player\n-\tvm.addPlayerInList = function(friend) {\n-\t\tvm.buttonAddPlayerTable = true;\n-\t\tvm.players.push(friend);\n-\t\t$localStorage.players = vm.players;\n-\t};\n+    var vm = this;\n+    var a = 2; //minimum number of players to start a tournamen\n+    vm.addPlayer = addPlayer;\n+    vm.addPlayerClicked = addPlayerClicked;","path":"app/player/player.controller.js","position":54,"original_position":54,"commit_id":"1ad41501098386578fe4fb443616d12e3811e6b8","original_commit_id":"1ad41501098386578fe4fb443616d12e3811e6b8","user":{"login":"astronati","id":2708431,"avatar_url":"https://avatars.githubusercontent.com/u/2708431?v=3","gravatar_id":"","url":"https://api.github.com/users/astronati","html_url":"https://github.com/astronati","followers_url":"https://api.github.com/users/astronati/followers","following_url":"https://api.github.com/users/astronati/following{/other_user}","gists_url":"https://api.github.com/users/astronati/gists{/gist_id}","starred_url":"https://api.github.com/users/astronati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astronati/subscriptions","organizations_url":"https://api.github.com/users/astronati/orgs","repos_url":"https://api.github.com/users/astronati/repos","events_url":"https://api.github.com/users/astronati/events{/privacy}","received_events_url":"https://api.github.com/users/astronati/received_events","type":"User","site_admin":false},"body":"The name of the methods should explain what it does. `addPlayerClicked` does not describe what it does","created_at":"2016-09-23T10:28:37Z","updated_at":"2016-09-23T10:32:58Z","html_url":"https://github.com/the-software-factory/angular-darts-tournament/pull/18#discussion_r80219664","pull_request_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/pulls/comments/80219664"},"html":{"href":"https://github.com/the-software-factory/angular-darts-tournament/pull/18#discussion_r80219664"},"pull_request":{"href":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/pulls/18","id":86477301,"html_url":"https://github.com/the-software-factory/angular-darts-tournament/pull/18","diff_url":"https://github.com/the-software-factory/angular-darts-tournament/pull/18.diff","patch_url":"https://github.com/the-software-factory/angular-darts-tournament/pull/18.patch","issue_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/issues/18","number":18,"state":"open","locked":false,"title":"Code review","user":{"login":"samulenti","id":12124932,"avatar_url":"https://avatars.githubusercontent.com/u/12124932?v=3","gravatar_id":"","url":"https://api.github.com/users/samulenti","html_url":"https://github.com/samulenti","followers_url":"https://api.github.com/users/samulenti/followers","following_url":"https://api.github.com/users/samulenti/following{/other_user}","gists_url":"https://api.github.com/users/samulenti/gists{/gist_id}","starred_url":"https://api.github.com/users/samulenti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samulenti/subscriptions","organizations_url":"https://api.github.com/users/samulenti/orgs","repos_url":"https://api.github.com/users/samulenti/repos","events_url":"https://api.github.com/users/samulenti/events{/privacy}","received_events_url":"https://api.github.com/users/samulenti/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-23T09:05:13Z","updated_at":"2016-09-23T10:32:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d18e5ed610ff469960d015ae892fcbb8133c6ab8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/pulls/18/commits","review_comments_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/pulls/18/comments","review_comment_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/pulls/comments{/number}","comments_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/issues/18/comments","statuses_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/statuses/1ad41501098386578fe4fb443616d12e3811e6b8","head":{"label":"the-software-factory:codeRev","ref":"codeRev","sha":"1ad41501098386578fe4fb443616d12e3811e6b8","user":{"login":"the-software-factory","id":11979076,"avatar_url":"https://avatars.githubusercontent.com/u/11979076?v=3","gravatar_id":"","url":"https://api.github.com/users/the-software-factory","html_url":"https://github.com/the-software-factory","followers_url":"https://api.github.com/users/the-software-factory/followers","following_url":"https://api.github.com/users/the-software-factory/following{/other_user}","gists_url":"https://api.github.com/users/the-software-factory/gists{/gist_id}","starred_url":"https://api.github.com/users/the-software-factory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the-software-factory/subscriptions","organizations_url":"https://api.github.com/users/the-software-factory/orgs","repos_url":"https://api.github.com/users/the-software-factory/repos","events_url":"https://api.github.com/users/the-software-factory/events{/privacy}","received_events_url":"https://api.github.com/users/the-software-factory/received_events","type":"Organization","site_admin":false},"repo":{"id":61634250,"name":"angular-darts-tournament","full_name":"the-software-factory/angular-darts-tournament","owner":{"login":"the-software-factory","id":11979076,"avatar_url":"https://avatars.githubusercontent.com/u/11979076?v=3","gravatar_id":"","url":"https://api.github.com/users/the-software-factory","html_url":"https://github.com/the-software-factory","followers_url":"https://api.github.com/users/the-software-factory/followers","following_url":"https://api.github.com/users/the-software-factory/following{/other_user}","gists_url":"https://api.github.com/users/the-software-factory/gists{/gist_id}","starred_url":"https://api.github.com/users/the-software-factory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the-software-factory/subscriptions","organizations_url":"https://api.github.com/users/the-software-factory/orgs","repos_url":"https://api.github.com/users/the-software-factory/repos","events_url":"https://api.github.com/users/the-software-factory/events{/privacy}","received_events_url":"https://api.github.com/users/the-software-factory/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/the-software-factory/angular-darts-tournament","description":"","fork":false,"url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament","forks_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/forks","keys_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/keys{/key_id}","collaborators_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/teams","hooks_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/hooks","issue_events_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/issues/events{/number}","events_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/events","assignees_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/assignees{/user}","branches_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/branches{/branch}","tags_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/tags","blobs_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/git/refs{/sha}","trees_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/git/trees{/sha}","statuses_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/statuses/{sha}","languages_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/languages","stargazers_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/stargazers","contributors_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/contributors","subscribers_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/subscribers","subscription_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/subscription","commits_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/commits{/sha}","git_commits_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/git/commits{/sha}","comments_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/comments{/number}","issue_comment_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/issues/comments{/number}","contents_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/contents/{+path}","compare_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/compare/{base}...{head}","merges_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/merges","archive_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/downloads","issues_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/issues{/number}","pulls_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/pulls{/number}","milestones_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/milestones{/number}","notifications_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/labels{/name}","releases_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/releases{/id}","deployments_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/deployments","created_at":"2016-06-21T13:02:49Z","updated_at":"2016-09-20T17:31:47Z","pushed_at":"2016-09-23T09:51:46Z","git_url":"git://github.com/the-software-factory/angular-darts-tournament.git","ssh_url":"git@github.com:the-software-factory/angular-darts-tournament.git","clone_url":"https://github.com/the-software-factory/angular-darts-tournament.git","svn_url":"https://github.com/the-software-factory/angular-darts-tournament","homepage":null,"size":25513,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":0,"default_branch":"devel"}},"base":{"label":"the-software-factory:devel","ref":"devel","sha":"21ec3f63a847cb8a81fe006b21cdd43b980dcafa","user":{"login":"the-software-factory","id":11979076,"avatar_url":"https://avatars.githubusercontent.com/u/11979076?v=3","gravatar_id":"","url":"https://api.github.com/users/the-software-factory","html_url":"https://github.com/the-software-factory","followers_url":"https://api.github.com/users/the-software-factory/followers","following_url":"https://api.github.com/users/the-software-factory/following{/other_user}","gists_url":"https://api.github.com/users/the-software-factory/gists{/gist_id}","starred_url":"https://api.github.com/users/the-software-factory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the-software-factory/subscriptions","organizations_url":"https://api.github.com/users/the-software-factory/orgs","repos_url":"https://api.github.com/users/the-software-factory/repos","events_url":"https://api.github.com/users/the-software-factory/events{/privacy}","received_events_url":"https://api.github.com/users/the-software-factory/received_events","type":"Organization","site_admin":false},"repo":{"id":61634250,"name":"angular-darts-tournament","full_name":"the-software-factory/angular-darts-tournament","owner":{"login":"the-software-factory","id":11979076,"avatar_url":"https://avatars.githubusercontent.com/u/11979076?v=3","gravatar_id":"","url":"https://api.github.com/users/the-software-factory","html_url":"https://github.com/the-software-factory","followers_url":"https://api.github.com/users/the-software-factory/followers","following_url":"https://api.github.com/users/the-software-factory/following{/other_user}","gists_url":"https://api.github.com/users/the-software-factory/gists{/gist_id}","starred_url":"https://api.github.com/users/the-software-factory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the-software-factory/subscriptions","organizations_url":"https://api.github.com/users/the-software-factory/orgs","repos_url":"https://api.github.com/users/the-software-factory/repos","events_url":"https://api.github.com/users/the-software-factory/events{/privacy}","received_events_url":"https://api.github.com/users/the-software-factory/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/the-software-factory/angular-darts-tournament","description":"","fork":false,"url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament","forks_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/forks","keys_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/keys{/key_id}","collaborators_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/teams","hooks_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/hooks","issue_events_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/issues/events{/number}","events_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/events","assignees_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/assignees{/user}","branches_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/branches{/branch}","tags_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/tags","blobs_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/git/refs{/sha}","trees_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/git/trees{/sha}","statuses_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/statuses/{sha}","languages_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/languages","stargazers_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/stargazers","contributors_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/contributors","subscribers_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/subscribers","subscription_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/subscription","commits_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/commits{/sha}","git_commits_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/git/commits{/sha}","comments_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/comments{/number}","issue_comment_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/issues/comments{/number}","contents_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/contents/{+path}","compare_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/compare/{base}...{head}","merges_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/merges","archive_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/downloads","issues_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/issues{/number}","pulls_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/pulls{/number}","milestones_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/milestones{/number}","notifications_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/labels{/name}","releases_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/releases{/id}","deployments_url":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/deployments","created_at":"2016-06-21T13:02:49Z","updated_at":"2016-09-20T17:31:47Z","pushed_at":"2016-09-23T09:51:46Z","git_url":"git://github.com/the-software-factory/angular-darts-tournament.git","ssh_url":"git@github.com:the-software-factory/angular-darts-tournament.git","clone_url":"https://github.com/the-software-factory/angular-darts-tournament.git","svn_url":"https://github.com/the-software-factory/angular-darts-tournament","homepage":null,"size":25513,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":0,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/pulls/18"},"html":{"href":"https://github.com/the-software-factory/angular-darts-tournament/pull/18"},"issue":{"href":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/issues/18"},"comments":{"href":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/the-software-factory/angular-darts-tournament/statuses/1ad41501098386578fe4fb443616d12e3811e6b8"}}}}
{"actor":{"display_login":"astronati"}}