{"action":"created","comment":{"url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls/comments/186823707","pull_request_review_id":118480095,"id":186823707,"diff_hunk":"@@ -0,0 +1,99 @@\n+require 'pry'\n+require_relative 'player.rb'\n+require_relative 'board.rb'\n+require_relative 'players/computer.rb'\n+require_relative 'players/human.rb'\n+\n+class Game\n+  attr_accessor :board, :player_1, :player_2\n+\n+  WIN_COMBINATIONS = [\n+    [0, 1, 2],\n+    [3, 4, 5],\n+    [6, 7, 8],\n+    [0, 3, 6],\n+    [1, 4, 7],\n+    [2, 5, 8],\n+    [0, 4, 8],\n+    [2, 4, 6]\n+  ]\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 game_type(input)\n+    case input\n+    when \"0\"\n+      @player_1 = Players::Computer.new(\"X\")\n+      @player_2 = Players::Computer.new(\"O\")\n+    when \"1\"\n+      @player_1 = Players::Human.new(\"X\")\n+      @player_2 = Players::Computer.new(\"O\")\n+    when \"2\"\n+      @player_1 = Players::Human.new(\"X\")\n+      @player_2 = Players::Human.new(\"O\")\n+    end\n+  end\n+\n+\n+  def current_player\n+    @board.turn_count % 2 == 0 ? player_1 : player_2","path":"lib/game.rb","position":43,"original_position":43,"commit_id":"04988700614a031cb3e301298243088be4bba630","original_commit_id":"04988700614a031cb3e301298243088be4bba630","user":{"login":"kkterai","id":19792273,"avatar_url":"https://avatars0.githubusercontent.com/u/19792273?v=4","gravatar_id":"","url":"https://api.github.com/users/kkterai","html_url":"https://github.com/kkterai","followers_url":"https://api.github.com/users/kkterai/followers","following_url":"https://api.github.com/users/kkterai/following{/other_user}","gists_url":"https://api.github.com/users/kkterai/gists{/gist_id}","starred_url":"https://api.github.com/users/kkterai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkterai/subscriptions","organizations_url":"https://api.github.com/users/kkterai/orgs","repos_url":"https://api.github.com/users/kkterai/repos","events_url":"https://api.github.com/users/kkterai/events{/privacy}","received_events_url":"https://api.github.com/users/kkterai/received_events","type":"User","site_admin":false},"body":"Use [`Integer#even?`](http://ruby-doc.org/core-1.8.7/Integer.html#method-i-even-3F) or [`Integer#odd?`](http://ruby-doc.org/core-1.8.7/Integer.html#method-i-odd-3F)\r\n\r\n`@board.turn_count.even? ? @player_1 : @player_2`","created_at":"2018-05-08T18:26:54Z","updated_at":"2018-05-08T18:26:54Z","html_url":"https://github.com/learn-co-students/ttt-with-ai-project-v-000/pull/1024#discussion_r186823707","pull_request_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls/1024","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls/comments/186823707"},"html":{"href":"https://github.com/learn-co-students/ttt-with-ai-project-v-000/pull/1024#discussion_r186823707"},"pull_request":{"href":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls/1024"}}},"pull_request":{"url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls/1024","id":181284528,"html_url":"https://github.com/learn-co-students/ttt-with-ai-project-v-000/pull/1024","diff_url":"https://github.com/learn-co-students/ttt-with-ai-project-v-000/pull/1024.diff","patch_url":"https://github.com/learn-co-students/ttt-with-ai-project-v-000/pull/1024.patch","issue_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/issues/1024","number":1024,"state":"open","locked":false,"title":"Project submitted","user":{"login":"treverandersen","id":700532,"avatar_url":"https://avatars3.githubusercontent.com/u/700532?v=4","gravatar_id":"","url":"https://api.github.com/users/treverandersen","html_url":"https://github.com/treverandersen","followers_url":"https://api.github.com/users/treverandersen/followers","following_url":"https://api.github.com/users/treverandersen/following{/other_user}","gists_url":"https://api.github.com/users/treverandersen/gists{/gist_id}","starred_url":"https://api.github.com/users/treverandersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treverandersen/subscriptions","organizations_url":"https://api.github.com/users/treverandersen/orgs","repos_url":"https://api.github.com/users/treverandersen/repos","events_url":"https://api.github.com/users/treverandersen/events{/privacy}","received_events_url":"https://api.github.com/users/treverandersen/received_events","type":"User","site_admin":false},"body":null,"created_at":"2018-04-12T18:13:15Z","updated_at":"2018-05-08T18:26:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3daa5c090c7468de57c420759be744d102e32e06","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls/1024/commits","review_comments_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls/1024/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/1024/comments","statuses_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/statuses/04988700614a031cb3e301298243088be4bba630","head":{"label":"treverandersen:master","ref":"master","sha":"04988700614a031cb3e301298243088be4bba630","user":{"login":"treverandersen","id":700532,"avatar_url":"https://avatars3.githubusercontent.com/u/700532?v=4","gravatar_id":"","url":"https://api.github.com/users/treverandersen","html_url":"https://github.com/treverandersen","followers_url":"https://api.github.com/users/treverandersen/followers","following_url":"https://api.github.com/users/treverandersen/following{/other_user}","gists_url":"https://api.github.com/users/treverandersen/gists{/gist_id}","starred_url":"https://api.github.com/users/treverandersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treverandersen/subscriptions","organizations_url":"https://api.github.com/users/treverandersen/orgs","repos_url":"https://api.github.com/users/treverandersen/repos","events_url":"https://api.github.com/users/treverandersen/events{/privacy}","received_events_url":"https://api.github.com/users/treverandersen/received_events","type":"User","site_admin":false},"repo":{"id":110195484,"name":"ttt-with-ai-project-v-000","full_name":"treverandersen/ttt-with-ai-project-v-000","owner":{"login":"treverandersen","id":700532,"avatar_url":"https://avatars3.githubusercontent.com/u/700532?v=4","gravatar_id":"","url":"https://api.github.com/users/treverandersen","html_url":"https://github.com/treverandersen","followers_url":"https://api.github.com/users/treverandersen/followers","following_url":"https://api.github.com/users/treverandersen/following{/other_user}","gists_url":"https://api.github.com/users/treverandersen/gists{/gist_id}","starred_url":"https://api.github.com/users/treverandersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treverandersen/subscriptions","organizations_url":"https://api.github.com/users/treverandersen/orgs","repos_url":"https://api.github.com/users/treverandersen/repos","events_url":"https://api.github.com/users/treverandersen/events{/privacy}","received_events_url":"https://api.github.com/users/treverandersen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/treverandersen/ttt-with-ai-project-v-000","description":null,"fork":true,"url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000","forks_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/forks","keys_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/keys{/key_id}","collaborators_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/teams","hooks_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/hooks","issue_events_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/issues/events{/number}","events_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/events","assignees_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/assignees{/user}","branches_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/branches{/branch}","tags_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/tags","blobs_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/git/refs{/sha}","trees_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/git/trees{/sha}","statuses_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/statuses/{sha}","languages_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/languages","stargazers_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/stargazers","contributors_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/contributors","subscribers_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/subscribers","subscription_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/subscription","commits_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/commits{/sha}","git_commits_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/git/commits{/sha}","comments_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/comments{/number}","issue_comment_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/issues/comments{/number}","contents_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/contents/{+path}","compare_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/compare/{base}...{head}","merges_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/merges","archive_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/downloads","issues_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/issues{/number}","pulls_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/pulls{/number}","milestones_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/milestones{/number}","notifications_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/labels{/name}","releases_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/releases{/id}","deployments_url":"https://api.github.com/repos/treverandersen/ttt-with-ai-project-v-000/deployments","created_at":"2017-11-10T03:01:30Z","updated_at":"2018-04-12T17:42:49Z","pushed_at":"2018-04-12T17:42:19Z","git_url":"git://github.com/treverandersen/ttt-with-ai-project-v-000.git","ssh_url":"git@github.com:treverandersen/ttt-with-ai-project-v-000.git","clone_url":"https://github.com/treverandersen/ttt-with-ai-project-v-000.git","svn_url":"https://github.com/treverandersen/ttt-with-ai-project-v-000","homepage":null,"size":53,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"learn-co-students:master","ref":"master","sha":"6b55f795e3021734fea9f8d5e59dd0806cfae27a","user":{"login":"learn-co-students","id":8825476,"avatar_url":"https://avatars3.githubusercontent.com/u/8825476?v=4","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://avatars3.githubusercontent.com/u/8825476?v=4","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":"2018-04-17T03:12:16Z","pushed_at":"2018-05-08T16:51:36Z","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":50,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1061,"mirror_url":null,"archived":false,"open_issues_count":854,"license":null,"forks":1061,"open_issues":854,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls/1024"},"html":{"href":"https://github.com/learn-co-students/ttt-with-ai-project-v-000/pull/1024"},"issue":{"href":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/issues/1024"},"comments":{"href":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/issues/1024/comments"},"review_comments":{"href":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls/1024/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/1024/commits"},"statuses":{"href":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/statuses/04988700614a031cb3e301298243088be4bba630"}},"author_association":"NONE"}}
{"actor":{"display_login":"kkterai"}}