{"action":"created","comment":{"url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls/comments/88964645","pull_request_review_id":9518823,"id":88964645,"diff_hunk":"@@ -0,0 +1,99 @@\n+require 'pry'\n+\n+class Game\n+attr_accessor :board, :player_1, :player_2\n+\n+WIN_COMBINATIONS = [[0,1,2], [3,4,5], [6,7,8], [0,3,6], [1,4,7], [2,5,8], [0,4,8], [2,4,6]]\n+\n+  def initialize(player_1 = Players::Human.new(\"X\"), player_2 = Players::Human.new(\"O\"), board = Board.new)\n+    @board = board\n+    @player_1 = player_1\n+    @player_2 = player_2\n+  end\n+\n+  def turn\n+    character = current_player\n+    input = character.move(@board)\n+    if @board.valid_move?(input) == true\n+      @board.update(input, character)\n+      @board.display\n+    else\n+      turn\n+    end\n+  end\n+\n+  def current_player\n+    if (@board.turn_count.odd?)\n+      return @player_2\n+    else\n+      return @player_1\n+    end\n+  end\n+\n+  def won?\n+\n+    WIN_COMBINATIONS.each do |win_combination|\n+      win_index_1 = win_combination[0]\n+      win_index_2 = win_combination[1]\n+      win_index_3 = win_combination[2]\n+\n+      position_1 = @board.cells[win_index_1]\n+      position_2 = @board.cells[win_index_2]\n+      position_3 = @board.cells[win_index_3]\n+\n+      if (position_1 == position_2 && position_2 == position_3  && position_1 != \" \" && position_2 != \" \" && position_3 != \" \")\n+        return win_combination\n+      end\n+    end\n+\n+    return false\n+\n+  end\n+\n+  def draw?\n+    if !(won?)\n+      if (@board.full?)\n+        return true\n+      else\n+        return false\n+      end\n+    else\n+      return false\n+    end\n+  end\n+\n+  def over?","path":"lib/game.rb","position":65,"original_position":65,"commit_id":"2f4970866a23d9cdf913b18c06e3e3f002b27208","original_commit_id":"2f4970866a23d9cdf913b18c06e3e3f002b27208","user":{"login":"Lukeghenco","id":15013243,"avatar_url":"https://avatars.githubusercontent.com/u/15013243?v=3","gravatar_id":"","url":"https://api.github.com/users/Lukeghenco","html_url":"https://github.com/Lukeghenco","followers_url":"https://api.github.com/users/Lukeghenco/followers","following_url":"https://api.github.com/users/Lukeghenco/following{/other_user}","gists_url":"https://api.github.com/users/Lukeghenco/gists{/gist_id}","starred_url":"https://api.github.com/users/Lukeghenco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lukeghenco/subscriptions","organizations_url":"https://api.github.com/users/Lukeghenco/orgs","repos_url":"https://api.github.com/users/Lukeghenco/repos","events_url":"https://api.github.com/users/Lukeghenco/events{/privacy}","received_events_url":"https://api.github.com/users/Lukeghenco/received_events","type":"User","site_admin":false},"body":"your draw? method already checks for @board.full?\r\n\r\nThis is also a good time to use the ternary operator","created_at":"2016-11-21T19:06:56Z","updated_at":"2016-11-21T19:07:22Z","html_url":"https://github.com/learn-co-students/ttt-with-ai-project-v-000/pull/340#discussion_r88964645","pull_request_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls/340","_links":{"self":{"href":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls/comments/88964645"},"html":{"href":"https://github.com/learn-co-students/ttt-with-ai-project-v-000/pull/340#discussion_r88964645"},"pull_request":{"href":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls/340"}}},"pull_request":{"url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls/340","id":94304112,"html_url":"https://github.com/learn-co-students/ttt-with-ai-project-v-000/pull/340","diff_url":"https://github.com/learn-co-students/ttt-with-ai-project-v-000/pull/340.diff","patch_url":"https://github.com/learn-co-students/ttt-with-ai-project-v-000/pull/340.patch","issue_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/issues/340","number":340,"state":"open","locked":false,"title":"Done","user":{"login":"bigrocketgames","id":13439789,"avatar_url":"https://avatars.githubusercontent.com/u/13439789?v=3","gravatar_id":"","url":"https://api.github.com/users/bigrocketgames","html_url":"https://github.com/bigrocketgames","followers_url":"https://api.github.com/users/bigrocketgames/followers","following_url":"https://api.github.com/users/bigrocketgames/following{/other_user}","gists_url":"https://api.github.com/users/bigrocketgames/gists{/gist_id}","starred_url":"https://api.github.com/users/bigrocketgames/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bigrocketgames/subscriptions","organizations_url":"https://api.github.com/users/bigrocketgames/orgs","repos_url":"https://api.github.com/users/bigrocketgames/repos","events_url":"https://api.github.com/users/bigrocketgames/events{/privacy}","received_events_url":"https://api.github.com/users/bigrocketgames/received_events","type":"User","site_admin":false},"body":null,"created_at":"2016-11-18T05:15:44Z","updated_at":"2016-11-21T19:07:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"740ead412559e0350b79a7cff562f830d59969ee","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls/340/commits","review_comments_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls/340/comments","review_comment_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls/comments{/number}","comments_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/issues/340/comments","statuses_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/statuses/2f4970866a23d9cdf913b18c06e3e3f002b27208","head":{"label":"bigrocketgames:master","ref":"master","sha":"2f4970866a23d9cdf913b18c06e3e3f002b27208","user":{"login":"bigrocketgames","id":13439789,"avatar_url":"https://avatars.githubusercontent.com/u/13439789?v=3","gravatar_id":"","url":"https://api.github.com/users/bigrocketgames","html_url":"https://github.com/bigrocketgames","followers_url":"https://api.github.com/users/bigrocketgames/followers","following_url":"https://api.github.com/users/bigrocketgames/following{/other_user}","gists_url":"https://api.github.com/users/bigrocketgames/gists{/gist_id}","starred_url":"https://api.github.com/users/bigrocketgames/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bigrocketgames/subscriptions","organizations_url":"https://api.github.com/users/bigrocketgames/orgs","repos_url":"https://api.github.com/users/bigrocketgames/repos","events_url":"https://api.github.com/users/bigrocketgames/events{/privacy}","received_events_url":"https://api.github.com/users/bigrocketgames/received_events","type":"User","site_admin":false},"repo":{"id":73575667,"name":"ttt-with-ai-project-v-000","full_name":"bigrocketgames/ttt-with-ai-project-v-000","owner":{"login":"bigrocketgames","id":13439789,"avatar_url":"https://avatars.githubusercontent.com/u/13439789?v=3","gravatar_id":"","url":"https://api.github.com/users/bigrocketgames","html_url":"https://github.com/bigrocketgames","followers_url":"https://api.github.com/users/bigrocketgames/followers","following_url":"https://api.github.com/users/bigrocketgames/following{/other_user}","gists_url":"https://api.github.com/users/bigrocketgames/gists{/gist_id}","starred_url":"https://api.github.com/users/bigrocketgames/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bigrocketgames/subscriptions","organizations_url":"https://api.github.com/users/bigrocketgames/orgs","repos_url":"https://api.github.com/users/bigrocketgames/repos","events_url":"https://api.github.com/users/bigrocketgames/events{/privacy}","received_events_url":"https://api.github.com/users/bigrocketgames/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bigrocketgames/ttt-with-ai-project-v-000","description":null,"fork":true,"url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000","forks_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/forks","keys_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/teams","hooks_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/hooks","issue_events_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/issues/events{/number}","events_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/events","assignees_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/assignees{/user}","branches_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/branches{/branch}","tags_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/tags","blobs_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/git/refs{/sha}","trees_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/statuses/{sha}","languages_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/languages","stargazers_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/stargazers","contributors_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/contributors","subscribers_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/subscribers","subscription_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/subscription","commits_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/commits{/sha}","git_commits_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/git/commits{/sha}","comments_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/comments{/number}","issue_comment_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/issues/comments{/number}","contents_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/contents/{+path}","compare_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/merges","archive_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/downloads","issues_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/issues{/number}","pulls_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/pulls{/number}","milestones_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/milestones{/number}","notifications_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/labels{/name}","releases_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/releases{/id}","deployments_url":"https://api.github.com/repos/bigrocketgames/ttt-with-ai-project-v-000/deployments","created_at":"2016-11-12T20:08:28Z","updated_at":"2016-11-12T20:08:30Z","pushed_at":"2016-11-18T05:15:42Z","git_url":"git://github.com/bigrocketgames/ttt-with-ai-project-v-000.git","ssh_url":"git@github.com:bigrocketgames/ttt-with-ai-project-v-000.git","clone_url":"https://github.com/bigrocketgames/ttt-with-ai-project-v-000.git","svn_url":"https://github.com/bigrocketgames/ttt-with-ai-project-v-000","homepage":null,"size":38,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"learn-co-students:master","ref":"master","sha":"5125e4cb97899b63a0cb27351e3a712b15ff8c87","user":{"login":"learn-co-students","id":8825476,"avatar_url":"https://avatars.githubusercontent.com/u/8825476?v=3","gravatar_id":"","url":"https://api.github.com/users/learn-co-students","html_url":"https://github.com/learn-co-students","followers_url":"https://api.github.com/users/learn-co-students/followers","following_url":"https://api.github.com/users/learn-co-students/following{/other_user}","gists_url":"https://api.github.com/users/learn-co-students/gists{/gist_id}","starred_url":"https://api.github.com/users/learn-co-students/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learn-co-students/subscriptions","organizations_url":"https://api.github.com/users/learn-co-students/orgs","repos_url":"https://api.github.com/users/learn-co-students/repos","events_url":"https://api.github.com/users/learn-co-students/events{/privacy}","received_events_url":"https://api.github.com/users/learn-co-students/received_events","type":"Organization","site_admin":false},"repo":{"id":46080145,"name":"ttt-with-ai-project-v-000","full_name":"learn-co-students/ttt-with-ai-project-v-000","owner":{"login":"learn-co-students","id":8825476,"avatar_url":"https://avatars.githubusercontent.com/u/8825476?v=3","gravatar_id":"","url":"https://api.github.com/users/learn-co-students","html_url":"https://github.com/learn-co-students","followers_url":"https://api.github.com/users/learn-co-students/followers","following_url":"https://api.github.com/users/learn-co-students/following{/other_user}","gists_url":"https://api.github.com/users/learn-co-students/gists{/gist_id}","starred_url":"https://api.github.com/users/learn-co-students/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learn-co-students/subscriptions","organizations_url":"https://api.github.com/users/learn-co-students/orgs","repos_url":"https://api.github.com/users/learn-co-students/repos","events_url":"https://api.github.com/users/learn-co-students/events{/privacy}","received_events_url":"https://api.github.com/users/learn-co-students/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/learn-co-students/ttt-with-ai-project-v-000","description":null,"fork":false,"url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000","forks_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/forks","keys_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/keys{/key_id}","collaborators_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/teams","hooks_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/hooks","issue_events_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/issues/events{/number}","events_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/events","assignees_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/assignees{/user}","branches_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/branches{/branch}","tags_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/tags","blobs_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/git/refs{/sha}","trees_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/git/trees{/sha}","statuses_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/statuses/{sha}","languages_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/languages","stargazers_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/stargazers","contributors_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/contributors","subscribers_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/subscribers","subscription_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/subscription","commits_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/commits{/sha}","git_commits_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/git/commits{/sha}","comments_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/comments{/number}","issue_comment_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/issues/comments{/number}","contents_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/contents/{+path}","compare_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/compare/{base}...{head}","merges_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/merges","archive_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/downloads","issues_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/issues{/number}","pulls_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls{/number}","milestones_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/milestones{/number}","notifications_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/labels{/name}","releases_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/releases{/id}","deployments_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/deployments","created_at":"2015-11-12T20:52:43Z","updated_at":"2016-11-11T01:59:49Z","pushed_at":"2016-11-21T19:01:15Z","git_url":"git://github.com/learn-co-students/ttt-with-ai-project-v-000.git","ssh_url":"git@github.com:learn-co-students/ttt-with-ai-project-v-000.git","clone_url":"https://github.com/learn-co-students/ttt-with-ai-project-v-000.git","svn_url":"https://github.com/learn-co-students/ttt-with-ai-project-v-000","homepage":null,"size":3370,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":351,"mirror_url":null,"open_issues_count":169,"forks":351,"open_issues":169,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls/340"},"html":{"href":"https://github.com/learn-co-students/ttt-with-ai-project-v-000/pull/340"},"issue":{"href":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/issues/340"},"comments":{"href":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/issues/340/comments"},"review_comments":{"href":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls/340/comments"},"review_comment":{"href":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls/340/commits"},"statuses":{"href":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/statuses/2f4970866a23d9cdf913b18c06e3e3f002b27208"}}}}
{"actor":{"display_login":"Lukeghenco"}}