{"action":"created","issue":{"url":"https://api.github.com/repos/ga-wdi-boston/game-project/issues/371","repository_url":"https://api.github.com/repos/ga-wdi-boston/game-project","labels_url":"https://api.github.com/repos/ga-wdi-boston/game-project/issues/371/labels{/name}","comments_url":"https://api.github.com/repos/ga-wdi-boston/game-project/issues/371/comments","events_url":"https://api.github.com/repos/ga-wdi-boston/game-project/issues/371/events","html_url":"https://github.com/ga-wdi-boston/game-project/issues/371","id":187228572,"number":371,"title":"trying to get onClick() to stop after winCheck() executes.  ","user":{"login":"RpRoderick","id":22726092,"avatar_url":"https://avatars.githubusercontent.com/u/22726092?v=3","gravatar_id":"","url":"https://api.github.com/users/RpRoderick","html_url":"https://github.com/RpRoderick","followers_url":"https://api.github.com/users/RpRoderick/followers","following_url":"https://api.github.com/users/RpRoderick/following{/other_user}","gists_url":"https://api.github.com/users/RpRoderick/gists{/gist_id}","starred_url":"https://api.github.com/users/RpRoderick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RpRoderick/subscriptions","organizations_url":"https://api.github.com/users/RpRoderick/orgs","repos_url":"https://api.github.com/users/RpRoderick/repos","events_url":"https://api.github.com/users/RpRoderick/events{/privacy}","received_events_url":"https://api.github.com/users/RpRoderick/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2016-11-04T00:59:26Z","updated_at":"2016-11-08T21:39:31Z","closed_at":null,"body":" ```js\r\nconst onTileClick = function () {\r\n  let tile = $(this).attr('class');\r\n  let i = +(tile.replace(/\\D/g, ''));\r\n   if (world.ttt.player === 'x') {\r\n     $('.'+tile).append('X');\r\n     world.ttt.player = 'o';\r\n     world.ttt.board[i] = 'x';\r\n  } else if (world.ttt.player === 'o') {\r\n     $('.'+tile).append('O');\r\n     world.ttt.player = 'x'; \r\n     world.ttt.board[i] = 'o';\r\n  }\r\n    if (winCheck()) {\r\n      $('table').css('pointer-events', 'none');  \r\n console.log('you win');\r\n    }\r\n};\r\n```\r\n\r\n\r\ndebugger above win check is fine, debugger below if winCheck doesn't kick in.  this console.log above ('you win') doesn't work, but the console.log in the winCheck function itself does work and announces ('win') when you x or o a correct [i] sequence.  So, the if statement isn't kicking in here, I believe.   I have no linter errors at all.  no console errors pop up.  seems like a flow problem, but I can't see it."},"comment":{"url":"https://api.github.com/repos/ga-wdi-boston/game-project/issues/comments/259267968","html_url":"https://github.com/ga-wdi-boston/game-project/issues/371#issuecomment-259267968","issue_url":"https://api.github.com/repos/ga-wdi-boston/game-project/issues/371","id":259267968,"user":{"login":"neugierige","id":10066657,"avatar_url":"https://avatars.githubusercontent.com/u/10066657?v=3","gravatar_id":"","url":"https://api.github.com/users/neugierige","html_url":"https://github.com/neugierige","followers_url":"https://api.github.com/users/neugierige/followers","following_url":"https://api.github.com/users/neugierige/following{/other_user}","gists_url":"https://api.github.com/users/neugierige/gists{/gist_id}","starred_url":"https://api.github.com/users/neugierige/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neugierige/subscriptions","organizations_url":"https://api.github.com/users/neugierige/orgs","repos_url":"https://api.github.com/users/neugierige/repos","events_url":"https://api.github.com/users/neugierige/events{/privacy}","received_events_url":"https://api.github.com/users/neugierige/received_events","type":"User","site_admin":false},"created_at":"2016-11-08T21:39:31Z","updated_at":"2016-11-08T21:39:31Z","body":"hey @RpRoderick are you still working on this one? can we close it yet?"}}
{"actor":{"display_login":"neugierige"}}