{"action":"created","comment":{"url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls/comments/52777801","id":52777801,"diff_hunk":"@@ -1,3 +1,50 @@\n #!/usr/bin/env ruby\n \n require_relative '../config/environment'\n+\n+play_again= \"\"\n+until play_again == \"n\"\n+  puts \"*** Welcome to Tic Tac Toe ***\"\n+  puts \"What kind of game do you want to play? 0,1, or 2 player.\"\n+\n+  kind = gets.strip\n+\n+    if kind == \"2\"\n+      puts \"Who should go first? X or O.\"\n+      first_player = gets.strip.downcase\n+        case first_player\n+          when \"x\"\n+            Game.new.play\n+          when \"o\"\n+            Game.new(Player::Human.new(\"O\"), Player::Human.new(\"X\"), Board.new).play\n+        end\n+      \n+        puts \"Do you want to play again (y/n)?.\"\n+        play_again = gets.strip\n+          \n+    elsif kind ==\"1\"\n+            puts \"Who should go first? X(computer) or O(you).\"\n+              first_player = gets.strip.downcase\n+            case first_player\n+              when \"x\"\n+                Game.new(Player::Computer.new(\"X\"), Player::Human.new(\"O\"), Board.new).play\n+              when \"o\"\n+                Game.new(Player::Human.new(\"O\"), Player::Computer.new(\"X\"), Board.new).play\n+            end\n+            puts \"Do you want to play again (y/n)?.\"\n+            play_again = gets.strip\n+          \n+\n+    elsif kind ==\"0\"\n+            \n+            Game.new(Player::Computer.new(\"X\"), Player::Computer.new(\"O\"), Board.new).play\n+            puts \"Do you want to play again (y/n)?.\"\n+            play_again = gets.strip\n+    end\n+\n+end","path":"bin/tictactoe","position":45,"original_position":45,"commit_id":"ed0ae0219cfd9ea596c8991acc5431f06cda7607","original_commit_id":"ed0ae0219cfd9ea596c8991acc5431f06cda7607","user":{"login":"randallreedjr","id":2908283,"avatar_url":"https://avatars.githubusercontent.com/u/2908283?v=3","gravatar_id":"","url":"https://api.github.com/users/randallreedjr","html_url":"https://github.com/randallreedjr","followers_url":"https://api.github.com/users/randallreedjr/followers","following_url":"https://api.github.com/users/randallreedjr/following{/other_user}","gists_url":"https://api.github.com/users/randallreedjr/gists{/gist_id}","starred_url":"https://api.github.com/users/randallreedjr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/randallreedjr/subscriptions","organizations_url":"https://api.github.com/users/randallreedjr/orgs","repos_url":"https://api.github.com/users/randallreedjr/repos","events_url":"https://api.github.com/users/randallreedjr/events{/privacy}","received_events_url":"https://api.github.com/users/randallreedjr/received_events","type":"User","site_admin":false},"body":"Prefer to encapsulate CLI logic into a class. For example, the only code in your bin executable should be:\r\n\r\n```ruby\r\n#!/usr/bin/env ruby\r\n       \r\nrequire_relative '../config/environment'\r\n\r\nTicTacToeCLI.new.call\r\n```\r\n\r\nAnd then you'd have a file: `lib/tic_tac_toe_cli.rb` with:\r\n\r\n```ruby\r\nclass TicTacToeCLI\r\n  def initialize\r\n  end\r\n\r\n  def call\r\n   # Your game logic\r\n  end\r\nend\r\n```\r\n\r\nThe code in your bin would generally just go in `call`.","created_at":"2016-02-12T18:22:44Z","updated_at":"2016-02-12T18:22:44Z","html_url":"https://github.com/learn-co-students/ttt-with-ai-project-v-000/pull/70#discussion_r52777801","pull_request_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls/70","_links":{"self":{"href":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls/comments/52777801"},"html":{"href":"https://github.com/learn-co-students/ttt-with-ai-project-v-000/pull/70#discussion_r52777801"},"pull_request":{"href":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls/70"}}},"pull_request":{"url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls/70","id":58491051,"html_url":"https://github.com/learn-co-students/ttt-with-ai-project-v-000/pull/70","diff_url":"https://github.com/learn-co-students/ttt-with-ai-project-v-000/pull/70.diff","patch_url":"https://github.com/learn-co-students/ttt-with-ai-project-v-000/pull/70.patch","issue_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/issues/70","number":70,"state":"open","locked":false,"title":"Done","user":{"login":"tejbans","id":15044483,"avatar_url":"https://avatars.githubusercontent.com/u/15044483?v=3","gravatar_id":"","url":"https://api.github.com/users/tejbans","html_url":"https://github.com/tejbans","followers_url":"https://api.github.com/users/tejbans/followers","following_url":"https://api.github.com/users/tejbans/following{/other_user}","gists_url":"https://api.github.com/users/tejbans/gists{/gist_id}","starred_url":"https://api.github.com/users/tejbans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tejbans/subscriptions","organizations_url":"https://api.github.com/users/tejbans/orgs","repos_url":"https://api.github.com/users/tejbans/repos","events_url":"https://api.github.com/users/tejbans/events{/privacy}","received_events_url":"https://api.github.com/users/tejbans/received_events","type":"User","site_admin":false},"body":null,"created_at":"2016-02-05T22:05:42Z","updated_at":"2016-02-12T18:22:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6f7e7cd6a7773adecf4191f2fe71382c9ce52c72","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls/70/commits","review_comments_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls/70/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/70/comments","statuses_url":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/statuses/ed0ae0219cfd9ea596c8991acc5431f06cda7607","head":{"label":"tejbans:master","ref":"master","sha":"ed0ae0219cfd9ea596c8991acc5431f06cda7607","user":{"login":"tejbans","id":15044483,"avatar_url":"https://avatars.githubusercontent.com/u/15044483?v=3","gravatar_id":"","url":"https://api.github.com/users/tejbans","html_url":"https://github.com/tejbans","followers_url":"https://api.github.com/users/tejbans/followers","following_url":"https://api.github.com/users/tejbans/following{/other_user}","gists_url":"https://api.github.com/users/tejbans/gists{/gist_id}","starred_url":"https://api.github.com/users/tejbans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tejbans/subscriptions","organizations_url":"https://api.github.com/users/tejbans/orgs","repos_url":"https://api.github.com/users/tejbans/repos","events_url":"https://api.github.com/users/tejbans/events{/privacy}","received_events_url":"https://api.github.com/users/tejbans/received_events","type":"User","site_admin":false},"repo":{"id":50529576,"name":"ttt-with-ai-project-v-000","full_name":"tejbans/ttt-with-ai-project-v-000","owner":{"login":"tejbans","id":15044483,"avatar_url":"https://avatars.githubusercontent.com/u/15044483?v=3","gravatar_id":"","url":"https://api.github.com/users/tejbans","html_url":"https://github.com/tejbans","followers_url":"https://api.github.com/users/tejbans/followers","following_url":"https://api.github.com/users/tejbans/following{/other_user}","gists_url":"https://api.github.com/users/tejbans/gists{/gist_id}","starred_url":"https://api.github.com/users/tejbans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tejbans/subscriptions","organizations_url":"https://api.github.com/users/tejbans/orgs","repos_url":"https://api.github.com/users/tejbans/repos","events_url":"https://api.github.com/users/tejbans/events{/privacy}","received_events_url":"https://api.github.com/users/tejbans/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tejbans/ttt-with-ai-project-v-000","description":null,"fork":true,"url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000","forks_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/forks","keys_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/teams","hooks_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/hooks","issue_events_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/issues/events{/number}","events_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/events","assignees_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/assignees{/user}","branches_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/branches{/branch}","tags_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/tags","blobs_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/git/refs{/sha}","trees_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/statuses/{sha}","languages_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/languages","stargazers_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/stargazers","contributors_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/contributors","subscribers_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/subscribers","subscription_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/subscription","commits_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/commits{/sha}","git_commits_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/git/commits{/sha}","comments_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/comments{/number}","issue_comment_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/issues/comments{/number}","contents_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/contents/{+path}","compare_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/merges","archive_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/downloads","issues_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/issues{/number}","pulls_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/pulls{/number}","milestones_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/milestones{/number}","notifications_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/labels{/name}","releases_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/releases{/id}","deployments_url":"https://api.github.com/repos/tejbans/ttt-with-ai-project-v-000/deployments","created_at":"2016-01-27T18:46:10Z","updated_at":"2016-01-27T18:46:10Z","pushed_at":"2016-02-05T22:05:39Z","git_url":"git://github.com/tejbans/ttt-with-ai-project-v-000.git","ssh_url":"git@github.com:tejbans/ttt-with-ai-project-v-000.git","clone_url":"https://github.com/tejbans/ttt-with-ai-project-v-000.git","svn_url":"https://github.com/tejbans/ttt-with-ai-project-v-000","homepage":null,"size":22,"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":"8323dbabbe4087a3987d6fc26fa444695e75f6c2","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":"2015-11-12T20:52:52Z","pushed_at":"2016-02-12T00:03: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":92,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":94,"mirror_url":null,"open_issues_count":16,"forks":94,"open_issues":16,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls/70"},"html":{"href":"https://github.com/learn-co-students/ttt-with-ai-project-v-000/pull/70"},"issue":{"href":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/issues/70"},"comments":{"href":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/issues/70/comments"},"review_comments":{"href":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/pulls/70/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/70/commits"},"statuses":{"href":"https://api.github.com/repos/learn-co-students/ttt-with-ai-project-v-000/statuses/ed0ae0219cfd9ea596c8991acc5431f06cda7607"}}}}