{"action":"created","comment":{"url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/pulls/comments/55149069","id":55149069,"diff_hunk":"@@ -12,30 +16,138 @@ defmodule TTT.Board do\n     |> mark_with_fewest_moves\n   end\n \n-  def get_move_count_per_mark(board, marks) do\n+  def game_over?(board) do\n+    Enum.any?([not remaining_spaces?(board), found_winner?(board)], is_true?)\n+  end\n+\n+  def winning_mark(board) do\n+    winning_mark_in_row(board) <>\n+     winning_mark_in_column(board) <>\n+      winning_mark_in_diagonal(board)\n+  end\n+\n+  def found_winner?(board) do\n+    Enum.any?(win_in_any_direction?(board), is_true?)\n+  end\n+\n+  defp win_in_any_direction?(board) do\n+    [column_win?(board), row_win?(board), diagonal_win?(board)]\n+  end\n+\n+  defp winning_mark_in_diagonal(board) do\n+    diagonal_marks(board)","path":"ttt/lib/ttt/board.ex","position":41,"original_position":41,"commit_id":"05a10363f92e485116306c6a80b3673d69d8870e","original_commit_id":"05a10363f92e485116306c6a80b3673d69d8870e","user":{"login":"felipesere","id":1850188,"avatar_url":"https://avatars.githubusercontent.com/u/1850188?v=3","gravatar_id":"","url":"https://api.github.com/users/felipesere","html_url":"https://github.com/felipesere","followers_url":"https://api.github.com/users/felipesere/followers","following_url":"https://api.github.com/users/felipesere/following{/other_user}","gists_url":"https://api.github.com/users/felipesere/gists{/gist_id}","starred_url":"https://api.github.com/users/felipesere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felipesere/subscriptions","organizations_url":"https://api.github.com/users/felipesere/orgs","repos_url":"https://api.github.com/users/felipesere/repos","events_url":"https://api.github.com/users/felipesere/events{/privacy}","received_events_url":"https://api.github.com/users/felipesere/received_events","type":"User","site_admin":false},"body":"```\r\nboard\r\n|> diagonal_marks\r\n|> winning_mark_in_row\r\n```\r\nis a little more idiomatic","created_at":"2016-03-06T21:49:25Z","updated_at":"2016-03-06T21:49:25Z","html_url":"https://github.com/sarahabimay/TicTacToe_Elixir/pull/8#discussion_r55149069","pull_request_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/pulls/comments/55149069"},"html":{"href":"https://github.com/sarahabimay/TicTacToe_Elixir/pull/8#discussion_r55149069"},"pull_request":{"href":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/pulls/8","id":61819700,"html_url":"https://github.com/sarahabimay/TicTacToe_Elixir/pull/8","diff_url":"https://github.com/sarahabimay/TicTacToe_Elixir/pull/8.diff","patch_url":"https://github.com/sarahabimay/TicTacToe_Elixir/pull/8.patch","issue_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/issues/8","number":8,"state":"open","locked":false,"title":"Change method name","user":{"login":"sarahabimay","id":10097084,"avatar_url":"https://avatars.githubusercontent.com/u/10097084?v=3","gravatar_id":"","url":"https://api.github.com/users/sarahabimay","html_url":"https://github.com/sarahabimay","followers_url":"https://api.github.com/users/sarahabimay/followers","following_url":"https://api.github.com/users/sarahabimay/following{/other_user}","gists_url":"https://api.github.com/users/sarahabimay/gists{/gist_id}","starred_url":"https://api.github.com/users/sarahabimay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarahabimay/subscriptions","organizations_url":"https://api.github.com/users/sarahabimay/orgs","repos_url":"https://api.github.com/users/sarahabimay/repos","events_url":"https://api.github.com/users/sarahabimay/events{/privacy}","received_events_url":"https://api.github.com/users/sarahabimay/received_events","type":"User","site_admin":false},"body":"@maikon\r\n@jsuchy","created_at":"2016-03-05T18:24:57Z","updated_at":"2016-03-06T21:49:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ee5d56b55f20290bb3537e191cb8dba0d6f71527","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/pulls/8/commits","review_comments_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/pulls/8/comments","review_comment_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/issues/8/comments","statuses_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/statuses/05a10363f92e485116306c6a80b3673d69d8870e","head":{"label":"sarahabimay:change_method_name","ref":"change_method_name","sha":"05a10363f92e485116306c6a80b3673d69d8870e","user":{"login":"sarahabimay","id":10097084,"avatar_url":"https://avatars.githubusercontent.com/u/10097084?v=3","gravatar_id":"","url":"https://api.github.com/users/sarahabimay","html_url":"https://github.com/sarahabimay","followers_url":"https://api.github.com/users/sarahabimay/followers","following_url":"https://api.github.com/users/sarahabimay/following{/other_user}","gists_url":"https://api.github.com/users/sarahabimay/gists{/gist_id}","starred_url":"https://api.github.com/users/sarahabimay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarahabimay/subscriptions","organizations_url":"https://api.github.com/users/sarahabimay/orgs","repos_url":"https://api.github.com/users/sarahabimay/repos","events_url":"https://api.github.com/users/sarahabimay/events{/privacy}","received_events_url":"https://api.github.com/users/sarahabimay/received_events","type":"User","site_admin":false},"repo":{"id":53046924,"name":"TicTacToe_Elixir","full_name":"sarahabimay/TicTacToe_Elixir","owner":{"login":"sarahabimay","id":10097084,"avatar_url":"https://avatars.githubusercontent.com/u/10097084?v=3","gravatar_id":"","url":"https://api.github.com/users/sarahabimay","html_url":"https://github.com/sarahabimay","followers_url":"https://api.github.com/users/sarahabimay/followers","following_url":"https://api.github.com/users/sarahabimay/following{/other_user}","gists_url":"https://api.github.com/users/sarahabimay/gists{/gist_id}","starred_url":"https://api.github.com/users/sarahabimay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarahabimay/subscriptions","organizations_url":"https://api.github.com/users/sarahabimay/orgs","repos_url":"https://api.github.com/users/sarahabimay/repos","events_url":"https://api.github.com/users/sarahabimay/events{/privacy}","received_events_url":"https://api.github.com/users/sarahabimay/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sarahabimay/TicTacToe_Elixir","description":"","fork":false,"url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir","forks_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/forks","keys_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/teams","hooks_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/hooks","issue_events_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/issues/events{/number}","events_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/events","assignees_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/assignees{/user}","branches_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/branches{/branch}","tags_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/tags","blobs_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/git/refs{/sha}","trees_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/statuses/{sha}","languages_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/languages","stargazers_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/stargazers","contributors_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/contributors","subscribers_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/subscribers","subscription_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/subscription","commits_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/commits{/sha}","git_commits_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/git/commits{/sha}","comments_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/comments{/number}","issue_comment_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/issues/comments{/number}","contents_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/contents/{+path}","compare_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/merges","archive_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/downloads","issues_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/issues{/number}","pulls_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/pulls{/number}","milestones_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/milestones{/number}","notifications_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/labels{/name}","releases_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/releases{/id}","deployments_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/deployments","created_at":"2016-03-03T11:59:14Z","updated_at":"2016-03-03T12:12:49Z","pushed_at":"2016-03-06T17:50:19Z","git_url":"git://github.com/sarahabimay/TicTacToe_Elixir.git","ssh_url":"git@github.com:sarahabimay/TicTacToe_Elixir.git","clone_url":"https://github.com/sarahabimay/TicTacToe_Elixir.git","svn_url":"https://github.com/sarahabimay/TicTacToe_Elixir","homepage":null,"size":19,"stargazers_count":0,"watchers_count":0,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":0,"default_branch":"master"}},"base":{"label":"sarahabimay:master","ref":"master","sha":"45815fb2a2ae11e78b874b083a37548a4ac7fef3","user":{"login":"sarahabimay","id":10097084,"avatar_url":"https://avatars.githubusercontent.com/u/10097084?v=3","gravatar_id":"","url":"https://api.github.com/users/sarahabimay","html_url":"https://github.com/sarahabimay","followers_url":"https://api.github.com/users/sarahabimay/followers","following_url":"https://api.github.com/users/sarahabimay/following{/other_user}","gists_url":"https://api.github.com/users/sarahabimay/gists{/gist_id}","starred_url":"https://api.github.com/users/sarahabimay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarahabimay/subscriptions","organizations_url":"https://api.github.com/users/sarahabimay/orgs","repos_url":"https://api.github.com/users/sarahabimay/repos","events_url":"https://api.github.com/users/sarahabimay/events{/privacy}","received_events_url":"https://api.github.com/users/sarahabimay/received_events","type":"User","site_admin":false},"repo":{"id":53046924,"name":"TicTacToe_Elixir","full_name":"sarahabimay/TicTacToe_Elixir","owner":{"login":"sarahabimay","id":10097084,"avatar_url":"https://avatars.githubusercontent.com/u/10097084?v=3","gravatar_id":"","url":"https://api.github.com/users/sarahabimay","html_url":"https://github.com/sarahabimay","followers_url":"https://api.github.com/users/sarahabimay/followers","following_url":"https://api.github.com/users/sarahabimay/following{/other_user}","gists_url":"https://api.github.com/users/sarahabimay/gists{/gist_id}","starred_url":"https://api.github.com/users/sarahabimay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarahabimay/subscriptions","organizations_url":"https://api.github.com/users/sarahabimay/orgs","repos_url":"https://api.github.com/users/sarahabimay/repos","events_url":"https://api.github.com/users/sarahabimay/events{/privacy}","received_events_url":"https://api.github.com/users/sarahabimay/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sarahabimay/TicTacToe_Elixir","description":"","fork":false,"url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir","forks_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/forks","keys_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/teams","hooks_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/hooks","issue_events_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/issues/events{/number}","events_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/events","assignees_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/assignees{/user}","branches_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/branches{/branch}","tags_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/tags","blobs_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/git/refs{/sha}","trees_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/statuses/{sha}","languages_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/languages","stargazers_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/stargazers","contributors_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/contributors","subscribers_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/subscribers","subscription_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/subscription","commits_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/commits{/sha}","git_commits_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/git/commits{/sha}","comments_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/comments{/number}","issue_comment_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/issues/comments{/number}","contents_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/contents/{+path}","compare_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/merges","archive_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/downloads","issues_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/issues{/number}","pulls_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/pulls{/number}","milestones_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/milestones{/number}","notifications_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/labels{/name}","releases_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/releases{/id}","deployments_url":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/deployments","created_at":"2016-03-03T11:59:14Z","updated_at":"2016-03-03T12:12:49Z","pushed_at":"2016-03-06T17:50:19Z","git_url":"git://github.com/sarahabimay/TicTacToe_Elixir.git","ssh_url":"git@github.com:sarahabimay/TicTacToe_Elixir.git","clone_url":"https://github.com/sarahabimay/TicTacToe_Elixir.git","svn_url":"https://github.com/sarahabimay/TicTacToe_Elixir","homepage":null,"size":19,"stargazers_count":0,"watchers_count":0,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/pulls/8"},"html":{"href":"https://github.com/sarahabimay/TicTacToe_Elixir/pull/8"},"issue":{"href":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/issues/8"},"comments":{"href":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/sarahabimay/TicTacToe_Elixir/statuses/05a10363f92e485116306c6a80b3673d69d8870e"}}}}