{"action":"created","comment":{"url":"https://api.github.com/repos/muan/emoji-minesweeper/pulls/comments/30954216","id":30954216,"diff_hunk":"@@ -51,6 +51,15 @@ Game.prototype.bindEvents = function () {\n   Array.prototype.forEach.call(cells, function (target) {\n     target.addEventListener('click', function () {\n       if (!target.isMasked || target.isFlagged) return false\n+      if (target.isBomb) {\n+        var unmaskedCount = document.getElementsByClassName('cell unmasked').length\n+        if(unmaskedCount === 0) {","path":"game.js","position":6,"original_position":6,"commit_id":"5a7e4e5b6b1f966ccb7b8eef6084e29d69ca5d1a","original_commit_id":"5a7e4e5b6b1f966ccb7b8eef6084e29d69ca5d1a","user":{"login":"muan","id":1153134,"avatar_url":"https://avatars.githubusercontent.com/u/1153134?v=3","gravatar_id":"","url":"https://api.github.com/users/muan","html_url":"https://github.com/muan","followers_url":"https://api.github.com/users/muan/followers","following_url":"https://api.github.com/users/muan/following{/other_user}","gists_url":"https://api.github.com/users/muan/gists{/gist_id}","starred_url":"https://api.github.com/users/muan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muan/subscriptions","organizations_url":"https://api.github.com/users/muan/orgs","repos_url":"https://api.github.com/users/muan/repos","events_url":"https://api.github.com/users/muan/events{/privacy}","received_events_url":"https://api.github.com/users/muan/received_events","type":"User","site_admin":true},"body":"We can just merged this condition with `isBomb` at L54.","created_at":"2015-05-24T17:43:36Z","updated_at":"2015-05-24T17:43:36Z","html_url":"https://github.com/muan/emoji-minesweeper/pull/5#discussion_r30954216","pull_request_url":"https://api.github.com/repos/muan/emoji-minesweeper/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/muan/emoji-minesweeper/pulls/comments/30954216"},"html":{"href":"https://github.com/muan/emoji-minesweeper/pull/5#discussion_r30954216"},"pull_request":{"href":"https://api.github.com/repos/muan/emoji-minesweeper/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/muan/emoji-minesweeper/pulls/5","id":36099316,"html_url":"https://github.com/muan/emoji-minesweeper/pull/5","diff_url":"https://github.com/muan/emoji-minesweeper/pull/5.diff","patch_url":"https://github.com/muan/emoji-minesweeper/pull/5.patch","issue_url":"https://api.github.com/repos/muan/emoji-minesweeper/issues/5","number":5,"state":"open","locked":false,"title":"👾Prevent losing the game at the first click","user":{"login":"javierbyte","id":2009676,"avatar_url":"https://avatars.githubusercontent.com/u/2009676?v=3","gravatar_id":"","url":"https://api.github.com/users/javierbyte","html_url":"https://github.com/javierbyte","followers_url":"https://api.github.com/users/javierbyte/followers","following_url":"https://api.github.com/users/javierbyte/following{/other_user}","gists_url":"https://api.github.com/users/javierbyte/gists{/gist_id}","starred_url":"https://api.github.com/users/javierbyte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javierbyte/subscriptions","organizations_url":"https://api.github.com/users/javierbyte/orgs","repos_url":"https://api.github.com/users/javierbyte/repos","events_url":"https://api.github.com/users/javierbyte/events{/privacy}","received_events_url":"https://api.github.com/users/javierbyte/received_events","type":"User","site_admin":false},"body":"Currently you may lost at the first click. I solved that by checking before losing if it was your first click, if so, restart the game and excecute the click event on the same cell.","created_at":"2015-05-24T07:28:08Z","updated_at":"2015-05-24T17:43:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a4b4a201fdfe0d08fe434bc9f6102a708d614d8e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/muan/emoji-minesweeper/pulls/5/commits","review_comments_url":"https://api.github.com/repos/muan/emoji-minesweeper/pulls/5/comments","review_comment_url":"https://api.github.com/repos/muan/emoji-minesweeper/pulls/comments{/number}","comments_url":"https://api.github.com/repos/muan/emoji-minesweeper/issues/5/comments","statuses_url":"https://api.github.com/repos/muan/emoji-minesweeper/statuses/5a7e4e5b6b1f966ccb7b8eef6084e29d69ca5d1a","head":{"label":"javierbyte:gh-pages","ref":"gh-pages","sha":"5a7e4e5b6b1f966ccb7b8eef6084e29d69ca5d1a","user":{"login":"javierbyte","id":2009676,"avatar_url":"https://avatars.githubusercontent.com/u/2009676?v=3","gravatar_id":"","url":"https://api.github.com/users/javierbyte","html_url":"https://github.com/javierbyte","followers_url":"https://api.github.com/users/javierbyte/followers","following_url":"https://api.github.com/users/javierbyte/following{/other_user}","gists_url":"https://api.github.com/users/javierbyte/gists{/gist_id}","starred_url":"https://api.github.com/users/javierbyte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javierbyte/subscriptions","organizations_url":"https://api.github.com/users/javierbyte/orgs","repos_url":"https://api.github.com/users/javierbyte/repos","events_url":"https://api.github.com/users/javierbyte/events{/privacy}","received_events_url":"https://api.github.com/users/javierbyte/received_events","type":"User","site_admin":false},"repo":{"id":36157674,"name":"emoji-minesweeper","full_name":"javierbyte/emoji-minesweeper","owner":{"login":"javierbyte","id":2009676,"avatar_url":"https://avatars.githubusercontent.com/u/2009676?v=3","gravatar_id":"","url":"https://api.github.com/users/javierbyte","html_url":"https://github.com/javierbyte","followers_url":"https://api.github.com/users/javierbyte/followers","following_url":"https://api.github.com/users/javierbyte/following{/other_user}","gists_url":"https://api.github.com/users/javierbyte/gists{/gist_id}","starred_url":"https://api.github.com/users/javierbyte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javierbyte/subscriptions","organizations_url":"https://api.github.com/users/javierbyte/orgs","repos_url":"https://api.github.com/users/javierbyte/repos","events_url":"https://api.github.com/users/javierbyte/events{/privacy}","received_events_url":"https://api.github.com/users/javierbyte/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/javierbyte/emoji-minesweeper","description":":boom::bomb::boom:","fork":true,"url":"https://api.github.com/repos/javierbyte/emoji-minesweeper","forks_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/forks","keys_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/teams","hooks_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/hooks","issue_events_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/issues/events{/number}","events_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/events","assignees_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/assignees{/user}","branches_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/branches{/branch}","tags_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/tags","blobs_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/git/refs{/sha}","trees_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/statuses/{sha}","languages_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/languages","stargazers_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/stargazers","contributors_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/contributors","subscribers_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/subscribers","subscription_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/subscription","commits_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/commits{/sha}","git_commits_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/git/commits{/sha}","comments_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/comments{/number}","issue_comment_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/issues/comments{/number}","contents_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/contents/{+path}","compare_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/merges","archive_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/downloads","issues_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/issues{/number}","pulls_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/pulls{/number}","milestones_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/milestones{/number}","notifications_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/labels{/name}","releases_url":"https://api.github.com/repos/javierbyte/emoji-minesweeper/releases{/id}","created_at":"2015-05-24T05:29:07Z","updated_at":"2015-05-24T05:29:08Z","pushed_at":"2015-05-24T17:01:09Z","git_url":"git://github.com/javierbyte/emoji-minesweeper.git","ssh_url":"git@github.com:javierbyte/emoji-minesweeper.git","clone_url":"https://github.com/javierbyte/emoji-minesweeper.git","svn_url":"https://github.com/javierbyte/emoji-minesweeper","homepage":"http://muan.co/emoji-minesweeper","size":0,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"gh-pages"}},"base":{"label":"muan:gh-pages","ref":"gh-pages","sha":"9458779c6079b45e82aa0f79ce32c45597c60761","user":{"login":"muan","id":1153134,"avatar_url":"https://avatars.githubusercontent.com/u/1153134?v=3","gravatar_id":"","url":"https://api.github.com/users/muan","html_url":"https://github.com/muan","followers_url":"https://api.github.com/users/muan/followers","following_url":"https://api.github.com/users/muan/following{/other_user}","gists_url":"https://api.github.com/users/muan/gists{/gist_id}","starred_url":"https://api.github.com/users/muan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muan/subscriptions","organizations_url":"https://api.github.com/users/muan/orgs","repos_url":"https://api.github.com/users/muan/repos","events_url":"https://api.github.com/users/muan/events{/privacy}","received_events_url":"https://api.github.com/users/muan/received_events","type":"User","site_admin":true},"repo":{"id":36055767,"name":"emoji-minesweeper","full_name":"muan/emoji-minesweeper","owner":{"login":"muan","id":1153134,"avatar_url":"https://avatars.githubusercontent.com/u/1153134?v=3","gravatar_id":"","url":"https://api.github.com/users/muan","html_url":"https://github.com/muan","followers_url":"https://api.github.com/users/muan/followers","following_url":"https://api.github.com/users/muan/following{/other_user}","gists_url":"https://api.github.com/users/muan/gists{/gist_id}","starred_url":"https://api.github.com/users/muan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muan/subscriptions","organizations_url":"https://api.github.com/users/muan/orgs","repos_url":"https://api.github.com/users/muan/repos","events_url":"https://api.github.com/users/muan/events{/privacy}","received_events_url":"https://api.github.com/users/muan/received_events","type":"User","site_admin":true},"private":false,"html_url":"https://github.com/muan/emoji-minesweeper","description":":boom::bomb::boom:","fork":false,"url":"https://api.github.com/repos/muan/emoji-minesweeper","forks_url":"https://api.github.com/repos/muan/emoji-minesweeper/forks","keys_url":"https://api.github.com/repos/muan/emoji-minesweeper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/muan/emoji-minesweeper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/muan/emoji-minesweeper/teams","hooks_url":"https://api.github.com/repos/muan/emoji-minesweeper/hooks","issue_events_url":"https://api.github.com/repos/muan/emoji-minesweeper/issues/events{/number}","events_url":"https://api.github.com/repos/muan/emoji-minesweeper/events","assignees_url":"https://api.github.com/repos/muan/emoji-minesweeper/assignees{/user}","branches_url":"https://api.github.com/repos/muan/emoji-minesweeper/branches{/branch}","tags_url":"https://api.github.com/repos/muan/emoji-minesweeper/tags","blobs_url":"https://api.github.com/repos/muan/emoji-minesweeper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/muan/emoji-minesweeper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/muan/emoji-minesweeper/git/refs{/sha}","trees_url":"https://api.github.com/repos/muan/emoji-minesweeper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/muan/emoji-minesweeper/statuses/{sha}","languages_url":"https://api.github.com/repos/muan/emoji-minesweeper/languages","stargazers_url":"https://api.github.com/repos/muan/emoji-minesweeper/stargazers","contributors_url":"https://api.github.com/repos/muan/emoji-minesweeper/contributors","subscribers_url":"https://api.github.com/repos/muan/emoji-minesweeper/subscribers","subscription_url":"https://api.github.com/repos/muan/emoji-minesweeper/subscription","commits_url":"https://api.github.com/repos/muan/emoji-minesweeper/commits{/sha}","git_commits_url":"https://api.github.com/repos/muan/emoji-minesweeper/git/commits{/sha}","comments_url":"https://api.github.com/repos/muan/emoji-minesweeper/comments{/number}","issue_comment_url":"https://api.github.com/repos/muan/emoji-minesweeper/issues/comments{/number}","contents_url":"https://api.github.com/repos/muan/emoji-minesweeper/contents/{+path}","compare_url":"https://api.github.com/repos/muan/emoji-minesweeper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/muan/emoji-minesweeper/merges","archive_url":"https://api.github.com/repos/muan/emoji-minesweeper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/muan/emoji-minesweeper/downloads","issues_url":"https://api.github.com/repos/muan/emoji-minesweeper/issues{/number}","pulls_url":"https://api.github.com/repos/muan/emoji-minesweeper/pulls{/number}","milestones_url":"https://api.github.com/repos/muan/emoji-minesweeper/milestones{/number}","notifications_url":"https://api.github.com/repos/muan/emoji-minesweeper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/muan/emoji-minesweeper/labels{/name}","releases_url":"https://api.github.com/repos/muan/emoji-minesweeper/releases{/id}","created_at":"2015-05-22T06:20:34Z","updated_at":"2015-05-24T14:14:31Z","pushed_at":"2015-05-24T17:01:10Z","git_url":"git://github.com/muan/emoji-minesweeper.git","ssh_url":"git@github.com:muan/emoji-minesweeper.git","clone_url":"https://github.com/muan/emoji-minesweeper.git","svn_url":"https://github.com/muan/emoji-minesweeper","homepage":"http://muan.co/emoji-minesweeper","size":0,"stargazers_count":44,"watchers_count":44,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":44,"default_branch":"gh-pages"}},"_links":{"self":{"href":"https://api.github.com/repos/muan/emoji-minesweeper/pulls/5"},"html":{"href":"https://github.com/muan/emoji-minesweeper/pull/5"},"issue":{"href":"https://api.github.com/repos/muan/emoji-minesweeper/issues/5"},"comments":{"href":"https://api.github.com/repos/muan/emoji-minesweeper/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/muan/emoji-minesweeper/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/muan/emoji-minesweeper/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/muan/emoji-minesweeper/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/muan/emoji-minesweeper/statuses/5a7e4e5b6b1f966ccb7b8eef6084e29d69ca5d1a"}}}}