{"action":"created","comment":{"url":"https://api.github.com/repos/andela/izanami-cfh/pulls/comments/105628721","pull_request_review_id":26515999,"id":105628721,"diff_hunk":"@@ -1,79 +1,96 @@\n angular.module('mean.directives', [])\n-  .directive('player', function (){\n-    return{\n-      restrict: 'EA',\n-      templateUrl: '/views/player.html',\n-      link: function(scope, elem, attr){\n-        scope.colors = ['#7CE4E8', '#FFFFa5', '#FC575E', '#F2ADFF', '#398EC4', '#8CFF95'];\n-      }\n-    };\n-  }).directive('answers', function() {\n-    return {\n-      restrict: 'EA',\n-      templateUrl: '/views/answers.html',\n-      link: function(scope, elem, attr) {\n+.directive('player', function (){\n+  return {\n+    restrict: 'EA',\n+    templateUrl: '/views/player.html',\n+    link: function(scope, elem, attr){\n+      scope.colors = ['#7CE4E8', '#FFFFa5', '#FC575E', '#F2ADFF', '#398EC4', '#8CFF95'];\n+    }\n+  };\n+}).directive('answers', function() {\n+  return {\n+    restrict: 'EA',\n+    templateUrl: '/views/answers.html',\n+    link: function(scope, elem, attr) {\n \n-        scope.$watch('game.state', function() {\n-          if (scope.game.state === 'winner has been chosen') {\n-            var curQ = scope.game.curQuestion;\n-            var curQuestionArr = curQ.text.split('_');\n-            var startStyle = \"<span style='color: \"+scope.colors[scope.game.players[scope.game.winningCardPlayer].color]+\"'>\";\n-            var endStyle = \"</span>\";\n-            var shouldRemoveQuestionPunctuation = false;\n-            var removePunctuation = function(cardIndex) {\n-              var cardText = scope.game.table[scope.game.winningCard].card[cardIndex].text;\n-              if (cardText.indexOf('.',cardText.length-2) === cardText.length-1) {\n-                cardText = cardText.slice(0,cardText.length-1);\n-              } else if ((cardText.indexOf('!',cardText.length-2) === cardText.length-1 ||\n-                cardText.indexOf('?',cardText.length-2) === cardText.length-1) &&\n-                cardIndex === curQ.numAnswers-1) {\n-                shouldRemoveQuestionPunctuation = true;\n-              }\n-              return cardText;\n-            };\n-            if (curQuestionArr.length > 1) {\n-              var cardText = removePunctuation(0);\n-              curQuestionArr.splice(1,0,startStyle+cardText+endStyle);\n-              if (curQ.numAnswers === 2) {\n-                cardText = removePunctuation(1);\n-                curQuestionArr.splice(3,0,startStyle+cardText+endStyle);\n-              }\n-              curQ.text = curQuestionArr.join(\"\");\n-              // Clean up the last punctuation mark in the question if there already is one in the answer\n-              if (shouldRemoveQuestionPunctuation) {\n-                if (curQ.text.indexOf('.',curQ.text.length-2) === curQ.text.length-1) {\n-                  curQ.text = curQ.text.slice(0,curQ.text.length-2);\n-                }\n+      scope.$watch('game.state', function() {\n+        if (scope.game.state === 'winner has been chosen') {\n+          var curQ = scope.game.curQuestion;\n+          var curQuestionArr = curQ.text.split('_');\n+          var startStyle = \"<span style='color: \"+scope.colors[scope.game.players[scope.game.winningCardPlayer].color]+\"'>\";\n+          var endStyle = \"</span>\";\n+          var shouldRemoveQuestionPunctuation = false;\n+          var removePunctuation = function(cardIndex) {\n+            var cardText = scope.game.table[scope.game.winningCard].card[cardIndex].text;\n+            if (cardText.indexOf('.',cardText.length-2) === cardText.length-1) {\n+              cardText = cardText.slice(0,cardText.length-1);\n+            } else if ((cardText.indexOf('!',cardText.length-2) === cardText.length-1 ||\n+              cardText.indexOf('?',cardText.length-2) === cardText.length-1) &&\n+              cardIndex === curQ.numAnswers-1) {\n+              shouldRemoveQuestionPunctuation = true;\n+            }\n+            return cardText;\n+          };\n+          if (curQuestionArr.length > 1) {\n+            var cardText = removePunctuation(0);\n+            curQuestionArr.splice(1,0,startStyle+cardText+endStyle);\n+            if (curQ.numAnswers === 2) {\n+              cardText = removePunctuation(1);\n+              curQuestionArr.splice(3,0,startStyle+cardText+endStyle);\n+            }\n+            curQ.text = curQuestionArr.join(\"\");","path":"public/js/directives.js","position":85,"original_position":85,"commit_id":"48b7c6dfd0bd441b02c6aba6c6613e90958cd26a","original_commit_id":"48b7c6dfd0bd441b02c6aba6c6613e90958cd26a","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars3.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Strings must use singlequote                                     quotes","created_at":"2017-03-13T10:26:16Z","updated_at":"2017-03-13T10:26:16Z","html_url":"https://github.com/andela/izanami-cfh/pull/22#discussion_r105628721","pull_request_url":"https://api.github.com/repos/andela/izanami-cfh/pulls/22","_links":{"self":{"href":"https://api.github.com/repos/andela/izanami-cfh/pulls/comments/105628721"},"html":{"href":"https://github.com/andela/izanami-cfh/pull/22#discussion_r105628721"},"pull_request":{"href":"https://api.github.com/repos/andela/izanami-cfh/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/andela/izanami-cfh/pulls/22","id":110148011,"html_url":"https://github.com/andela/izanami-cfh/pull/22","diff_url":"https://github.com/andela/izanami-cfh/pull/22.diff","patch_url":"https://github.com/andela/izanami-cfh/pull/22.patch","issue_url":"https://api.github.com/repos/andela/izanami-cfh/issues/22","number":22,"state":"open","locked":false,"title":"#139456259 Start a game and save records","user":{"login":"andela-iamao","id":25608320,"avatar_url":"https://avatars2.githubusercontent.com/u/25608320?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-iamao","html_url":"https://github.com/andela-iamao","followers_url":"https://api.github.com/users/andela-iamao/followers","following_url":"https://api.github.com/users/andela-iamao/following{/other_user}","gists_url":"https://api.github.com/users/andela-iamao/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-iamao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-iamao/subscriptions","organizations_url":"https://api.github.com/users/andela-iamao/orgs","repos_url":"https://api.github.com/users/andela-iamao/repos","events_url":"https://api.github.com/users/andela-iamao/events{/privacy}","received_events_url":"https://api.github.com/users/andela-iamao/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\n\r\nAllows user to click a button to start a game and save game records\r\n\r\n#### Description of Task to be completed?\r\n\r\nUser sees a 'play' button on successful login,\r\nwhen user clicks the button a modal pops up and then,\r\nuser gets the options of either playing with a friends or strangers.\r\nGame saves once the user start game and updates after each round\r\n\r\n#### How should this be manually tested?\r\n\r\n- clone the repo : `git clone https://github.com/andela/izanami-cfh.git`\r\n- install dependencies: `npm install`\r\n- start the app: `npm start`\r\n\r\n#### Any background context you want to provide?\r\n\r\nN/A\r\n\r\n#### What are the relevant pivotal tracker stories?\r\n\r\n#139456259 Users should be able to create/start a new game\r\n\r\n#### Screenshots (if appropriate)\r\n\r\nN/A\r\n\r\n#### Questions:\r\n\r\nN/A","created_at":"2017-03-10T15:19:11Z","updated_at":"2017-03-13T10:26:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e3434ec8902729023096061295a2f3fa49d8aa80","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/andela/izanami-cfh/pulls/22/commits","review_comments_url":"https://api.github.com/repos/andela/izanami-cfh/pulls/22/comments","review_comment_url":"https://api.github.com/repos/andela/izanami-cfh/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela/izanami-cfh/issues/22/comments","statuses_url":"https://api.github.com/repos/andela/izanami-cfh/statuses/48b7c6dfd0bd441b02c6aba6c6613e90958cd26a","head":{"label":"andela:feature/139456259/start-a-game-dev","ref":"feature/139456259/start-a-game-dev","sha":"48b7c6dfd0bd441b02c6aba6c6613e90958cd26a","user":{"login":"andela","id":4100206,"avatar_url":"https://avatars1.githubusercontent.com/u/4100206?v=3","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"repo":{"id":81216753,"name":"izanami-cfh","full_name":"andela/izanami-cfh","owner":{"login":"andela","id":4100206,"avatar_url":"https://avatars1.githubusercontent.com/u/4100206?v=3","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/andela/izanami-cfh","description":null,"fork":false,"url":"https://api.github.com/repos/andela/izanami-cfh","forks_url":"https://api.github.com/repos/andela/izanami-cfh/forks","keys_url":"https://api.github.com/repos/andela/izanami-cfh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/izanami-cfh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/izanami-cfh/teams","hooks_url":"https://api.github.com/repos/andela/izanami-cfh/hooks","issue_events_url":"https://api.github.com/repos/andela/izanami-cfh/issues/events{/number}","events_url":"https://api.github.com/repos/andela/izanami-cfh/events","assignees_url":"https://api.github.com/repos/andela/izanami-cfh/assignees{/user}","branches_url":"https://api.github.com/repos/andela/izanami-cfh/branches{/branch}","tags_url":"https://api.github.com/repos/andela/izanami-cfh/tags","blobs_url":"https://api.github.com/repos/andela/izanami-cfh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/izanami-cfh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/izanami-cfh/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/izanami-cfh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/izanami-cfh/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/izanami-cfh/languages","stargazers_url":"https://api.github.com/repos/andela/izanami-cfh/stargazers","contributors_url":"https://api.github.com/repos/andela/izanami-cfh/contributors","subscribers_url":"https://api.github.com/repos/andela/izanami-cfh/subscribers","subscription_url":"https://api.github.com/repos/andela/izanami-cfh/subscription","commits_url":"https://api.github.com/repos/andela/izanami-cfh/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/izanami-cfh/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/izanami-cfh/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/izanami-cfh/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/izanami-cfh/contents/{+path}","compare_url":"https://api.github.com/repos/andela/izanami-cfh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/izanami-cfh/merges","archive_url":"https://api.github.com/repos/andela/izanami-cfh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/izanami-cfh/downloads","issues_url":"https://api.github.com/repos/andela/izanami-cfh/issues{/number}","pulls_url":"https://api.github.com/repos/andela/izanami-cfh/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/izanami-cfh/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/izanami-cfh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/izanami-cfh/labels{/name}","releases_url":"https://api.github.com/repos/andela/izanami-cfh/releases{/id}","deployments_url":"https://api.github.com/repos/andela/izanami-cfh/deployments","created_at":"2017-02-07T14:27:13Z","updated_at":"2017-02-13T16:14:26Z","pushed_at":"2017-03-13T10:26:04Z","git_url":"git://github.com/andela/izanami-cfh.git","ssh_url":"git@github.com:andela/izanami-cfh.git","clone_url":"https://github.com/andela/izanami-cfh.git","svn_url":"https://github.com/andela/izanami-cfh","homepage":null,"size":9930,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"andela:develop","ref":"develop","sha":"94b6f4ca6db78b54657dedba950d54041dac4d38","user":{"login":"andela","id":4100206,"avatar_url":"https://avatars1.githubusercontent.com/u/4100206?v=3","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"repo":{"id":81216753,"name":"izanami-cfh","full_name":"andela/izanami-cfh","owner":{"login":"andela","id":4100206,"avatar_url":"https://avatars1.githubusercontent.com/u/4100206?v=3","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/andela/izanami-cfh","description":null,"fork":false,"url":"https://api.github.com/repos/andela/izanami-cfh","forks_url":"https://api.github.com/repos/andela/izanami-cfh/forks","keys_url":"https://api.github.com/repos/andela/izanami-cfh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/izanami-cfh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/izanami-cfh/teams","hooks_url":"https://api.github.com/repos/andela/izanami-cfh/hooks","issue_events_url":"https://api.github.com/repos/andela/izanami-cfh/issues/events{/number}","events_url":"https://api.github.com/repos/andela/izanami-cfh/events","assignees_url":"https://api.github.com/repos/andela/izanami-cfh/assignees{/user}","branches_url":"https://api.github.com/repos/andela/izanami-cfh/branches{/branch}","tags_url":"https://api.github.com/repos/andela/izanami-cfh/tags","blobs_url":"https://api.github.com/repos/andela/izanami-cfh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/izanami-cfh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/izanami-cfh/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/izanami-cfh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/izanami-cfh/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/izanami-cfh/languages","stargazers_url":"https://api.github.com/repos/andela/izanami-cfh/stargazers","contributors_url":"https://api.github.com/repos/andela/izanami-cfh/contributors","subscribers_url":"https://api.github.com/repos/andela/izanami-cfh/subscribers","subscription_url":"https://api.github.com/repos/andela/izanami-cfh/subscription","commits_url":"https://api.github.com/repos/andela/izanami-cfh/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/izanami-cfh/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/izanami-cfh/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/izanami-cfh/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/izanami-cfh/contents/{+path}","compare_url":"https://api.github.com/repos/andela/izanami-cfh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/izanami-cfh/merges","archive_url":"https://api.github.com/repos/andela/izanami-cfh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/izanami-cfh/downloads","issues_url":"https://api.github.com/repos/andela/izanami-cfh/issues{/number}","pulls_url":"https://api.github.com/repos/andela/izanami-cfh/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/izanami-cfh/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/izanami-cfh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/izanami-cfh/labels{/name}","releases_url":"https://api.github.com/repos/andela/izanami-cfh/releases{/id}","deployments_url":"https://api.github.com/repos/andela/izanami-cfh/deployments","created_at":"2017-02-07T14:27:13Z","updated_at":"2017-02-13T16:14:26Z","pushed_at":"2017-03-13T10:26:04Z","git_url":"git://github.com/andela/izanami-cfh.git","ssh_url":"git@github.com:andela/izanami-cfh.git","clone_url":"https://github.com/andela/izanami-cfh.git","svn_url":"https://github.com/andela/izanami-cfh","homepage":null,"size":9930,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/andela/izanami-cfh/pulls/22"},"html":{"href":"https://github.com/andela/izanami-cfh/pull/22"},"issue":{"href":"https://api.github.com/repos/andela/izanami-cfh/issues/22"},"comments":{"href":"https://api.github.com/repos/andela/izanami-cfh/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/andela/izanami-cfh/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/andela/izanami-cfh/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela/izanami-cfh/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/andela/izanami-cfh/statuses/48b7c6dfd0bd441b02c6aba6c6613e90958cd26a"}}}}
{"actor":{"display_login":"houndci-bot"}}