{"action":"created","comment":{"url":"https://api.github.com/repos/klkelley/tictactoe-clojure/pulls/comments/169517938","pull_request_review_id":97956663,"id":169517938,"diff_hunk":"@@ -1,73 +1,88 @@\n (ns tictactoe.game-runner-test\n   (:require [clojure.test :refer [deftest is testing]]\n-            [tictactoe.game-runner :as game-runner]))\n+            [tictactoe.game-runner :refer [start sleep-time]]\n+            [clojure.string :as string]))\n \n (defn make-input\n   [coll]\n   (apply str (interleave coll (repeat \"\\n\"))))\n \n-(defn lines\n-  [& args]\n-  (apply str (interpose \"\\n\" args)))\n+(deftest test-game-play-human-v-human\n+  (testing \"Player one wins the game on a 3x3 board via row\"\n+  (is (= true (string/includes?\n+         (with-out-str \"\"\n+           (with-in-str (make-input '(\"1\" \"1\" \"X\" \"O\" \"0\" \"5\" \"1\" \"4\" \"2\")) \n+            (binding [sleep-time 0]\n+              (start)))) \"Player X wins!\" )))))\n+\n+(deftest test-game-human-v-human-player2-wins\n+  (testing \"Player two wins the game on a 3x3 board\"\n+  (is (= true (string/includes?\n+         (with-out-str \"\"\n+           (with-in-str (make-input '(\"1\" \"1\" \"X\" \"O\" \"1\" \"4\" \"2\" \"8\" \"7\" \"0\")) \n+           (binding [sleep-time 0]\n+            (start)))) \"Player O wins!\" )))))\n+\n+(deftest test-4x4-game-human-v-human-player1-wins\n+  (testing \"Player one wins the game on a 4x4 board\"\n+  (is (= true (string/includes?\n+         (with-out-str \"\"\n+           (with-in-str (make-input '(\"1\" \"2\" \"X\" \"O\" \"0\" \"4\" \"1\" \"8\" \"2\" \"13\" \"3\")) \n+            (binding [sleep-time 0]\n+              (start)))) \"Player X wins!\" )))))\n+\n+(deftest invalid-marker-choice\n+  (testing \"User will be prompted for different marker if choice is invalid\"\n+  (is (= true (string/includes?\n+         (with-out-str \"\"\n+           (with-in-str (make-input '(\"1\" \"1\" \"X\" \"5\" \"P\" \"0\" \"4\" \"1\" \"3\" \"2\")) \n+            (binding [sleep-time 0]\n+              (start)))) \"Invalid. Please pick another marker.\" )))))\n \n-(deftest test-start-with-all-valid-input\n-  (testing \"Loops through all game options without errors when valid input is received\"\n-    (is (= (lines \"Welcome to Tic Tac Toe!\"\n-                  \"\"\n-                  \"Pick a game type:\"\n-                  \"1 => Human vs. Human\\n2 => Human vs. Easy Computer\"\n-                  \"What size board would you like to play?\"\n-                  \"1 => 3x3\"\n-                  \"2 => 4x4\"\n-                  \"Please pick player 1's marker (A-Z)\"\n-                  \"Please pick player 2's marker (A-Z)\"\n-                  \"You've chosen:\"\n-                  \"game => Human vs. Human\"\n-                  \"board => 4x4\"\n-                  \"player1 => A\"\n-                  \"player2 => B\\n\")\n-           (with-out-str \"\"\n-             (with-in-str (make-input '(\"1\" \"2\" \"a\" \"b\")) (game-runner/start)))))))\n+(deftest invalid-menu-choice\n+  (testing \"User must choose an available menu option\"\n+  (is (= true (string/includes?","path":"test/tictactoe/game_runner_test.clj","position":66,"original_position":66,"commit_id":"b94dbdf81b45286a3ef0c91aaf9d6f1ee4a7278d","original_commit_id":"b94dbdf81b45286a3ef0c91aaf9d6f1ee4a7278d","user":{"login":"aaronlahey","id":1595846,"avatar_url":"https://avatars1.githubusercontent.com/u/1595846?v=4","gravatar_id":"","url":"https://api.github.com/users/aaronlahey","html_url":"https://github.com/aaronlahey","followers_url":"https://api.github.com/users/aaronlahey/followers","following_url":"https://api.github.com/users/aaronlahey/following{/other_user}","gists_url":"https://api.github.com/users/aaronlahey/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronlahey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronlahey/subscriptions","organizations_url":"https://api.github.com/users/aaronlahey/orgs","repos_url":"https://api.github.com/users/aaronlahey/repos","events_url":"https://api.github.com/users/aaronlahey/events{/privacy}","received_events_url":"https://api.github.com/users/aaronlahey/received_events","type":"User","site_admin":false},"body":"indentation","created_at":"2018-02-21T02:01:24Z","updated_at":"2018-02-21T02:57:02Z","html_url":"https://github.com/klkelley/tictactoe-clojure/pull/4#discussion_r169517938","pull_request_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/pulls/4","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/klkelley/tictactoe-clojure/pulls/comments/169517938"},"html":{"href":"https://github.com/klkelley/tictactoe-clojure/pull/4#discussion_r169517938"},"pull_request":{"href":"https://api.github.com/repos/klkelley/tictactoe-clojure/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/klkelley/tictactoe-clojure/pulls/4","id":170278189,"html_url":"https://github.com/klkelley/tictactoe-clojure/pull/4","diff_url":"https://github.com/klkelley/tictactoe-clojure/pull/4.diff","patch_url":"https://github.com/klkelley/tictactoe-clojure/pull/4.patch","issue_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/issues/4","number":4,"state":"open","locked":false,"title":"Feat human vs human","user":{"login":"klkelley","id":20794282,"avatar_url":"https://avatars3.githubusercontent.com/u/20794282?v=4","gravatar_id":"","url":"https://api.github.com/users/klkelley","html_url":"https://github.com/klkelley","followers_url":"https://api.github.com/users/klkelley/followers","following_url":"https://api.github.com/users/klkelley/following{/other_user}","gists_url":"https://api.github.com/users/klkelley/gists{/gist_id}","starred_url":"https://api.github.com/users/klkelley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klkelley/subscriptions","organizations_url":"https://api.github.com/users/klkelley/orgs","repos_url":"https://api.github.com/users/klkelley/repos","events_url":"https://api.github.com/users/klkelley/events{/privacy}","received_events_url":"https://api.github.com/users/klkelley/received_events","type":"User","site_admin":false},"body":"https://trello.com/c/fzZyu7N6/48-600-human-vs-human-game","created_at":"2018-02-20T18:53:40Z","updated_at":"2018-02-21T02:57:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"700ff85397d7ce894c9f4e4d6ca419958411924d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/pulls/4/commits","review_comments_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/pulls/4/comments","review_comment_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/pulls/comments{/number}","comments_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/issues/4/comments","statuses_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/statuses/b94dbdf81b45286a3ef0c91aaf9d6f1ee4a7278d","head":{"label":"klkelley:feat-human-vs-human","ref":"feat-human-vs-human","sha":"b94dbdf81b45286a3ef0c91aaf9d6f1ee4a7278d","user":{"login":"klkelley","id":20794282,"avatar_url":"https://avatars3.githubusercontent.com/u/20794282?v=4","gravatar_id":"","url":"https://api.github.com/users/klkelley","html_url":"https://github.com/klkelley","followers_url":"https://api.github.com/users/klkelley/followers","following_url":"https://api.github.com/users/klkelley/following{/other_user}","gists_url":"https://api.github.com/users/klkelley/gists{/gist_id}","starred_url":"https://api.github.com/users/klkelley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klkelley/subscriptions","organizations_url":"https://api.github.com/users/klkelley/orgs","repos_url":"https://api.github.com/users/klkelley/repos","events_url":"https://api.github.com/users/klkelley/events{/privacy}","received_events_url":"https://api.github.com/users/klkelley/received_events","type":"User","site_admin":false},"repo":{"id":120952942,"name":"tictactoe-clojure","full_name":"klkelley/tictactoe-clojure","owner":{"login":"klkelley","id":20794282,"avatar_url":"https://avatars3.githubusercontent.com/u/20794282?v=4","gravatar_id":"","url":"https://api.github.com/users/klkelley","html_url":"https://github.com/klkelley","followers_url":"https://api.github.com/users/klkelley/followers","following_url":"https://api.github.com/users/klkelley/following{/other_user}","gists_url":"https://api.github.com/users/klkelley/gists{/gist_id}","starred_url":"https://api.github.com/users/klkelley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klkelley/subscriptions","organizations_url":"https://api.github.com/users/klkelley/orgs","repos_url":"https://api.github.com/users/klkelley/repos","events_url":"https://api.github.com/users/klkelley/events{/privacy}","received_events_url":"https://api.github.com/users/klkelley/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/klkelley/tictactoe-clojure","description":"TicTacToe in Clojure ","fork":false,"url":"https://api.github.com/repos/klkelley/tictactoe-clojure","forks_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/forks","keys_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/keys{/key_id}","collaborators_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/teams","hooks_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/hooks","issue_events_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/issues/events{/number}","events_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/events","assignees_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/assignees{/user}","branches_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/branches{/branch}","tags_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/tags","blobs_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/git/refs{/sha}","trees_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/git/trees{/sha}","statuses_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/statuses/{sha}","languages_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/languages","stargazers_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/stargazers","contributors_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/contributors","subscribers_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/subscribers","subscription_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/subscription","commits_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/commits{/sha}","git_commits_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/git/commits{/sha}","comments_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/comments{/number}","issue_comment_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/issues/comments{/number}","contents_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/contents/{+path}","compare_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/compare/{base}...{head}","merges_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/merges","archive_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/downloads","issues_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/issues{/number}","pulls_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/pulls{/number}","milestones_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/milestones{/number}","notifications_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/labels{/name}","releases_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/releases{/id}","deployments_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/deployments","created_at":"2018-02-09T20:35:42Z","updated_at":"2018-02-09T20:40:52Z","pushed_at":"2018-02-20T18:54:45Z","git_url":"git://github.com/klkelley/tictactoe-clojure.git","ssh_url":"git@github.com:klkelley/tictactoe-clojure.git","clone_url":"https://github.com/klkelley/tictactoe-clojure.git","svn_url":"https://github.com/klkelley/tictactoe-clojure","homepage":"","size":48,"stargazers_count":0,"watchers_count":0,"language":"Clojure","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"epl-1.0","name":"Eclipse Public License 1.0","spdx_id":"EPL-1.0","url":"https://api.github.com/licenses/epl-1.0"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"klkelley:master","ref":"master","sha":"737dcea5ade6f0ec7b95dd6e3d0aa728e0aa38d7","user":{"login":"klkelley","id":20794282,"avatar_url":"https://avatars3.githubusercontent.com/u/20794282?v=4","gravatar_id":"","url":"https://api.github.com/users/klkelley","html_url":"https://github.com/klkelley","followers_url":"https://api.github.com/users/klkelley/followers","following_url":"https://api.github.com/users/klkelley/following{/other_user}","gists_url":"https://api.github.com/users/klkelley/gists{/gist_id}","starred_url":"https://api.github.com/users/klkelley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klkelley/subscriptions","organizations_url":"https://api.github.com/users/klkelley/orgs","repos_url":"https://api.github.com/users/klkelley/repos","events_url":"https://api.github.com/users/klkelley/events{/privacy}","received_events_url":"https://api.github.com/users/klkelley/received_events","type":"User","site_admin":false},"repo":{"id":120952942,"name":"tictactoe-clojure","full_name":"klkelley/tictactoe-clojure","owner":{"login":"klkelley","id":20794282,"avatar_url":"https://avatars3.githubusercontent.com/u/20794282?v=4","gravatar_id":"","url":"https://api.github.com/users/klkelley","html_url":"https://github.com/klkelley","followers_url":"https://api.github.com/users/klkelley/followers","following_url":"https://api.github.com/users/klkelley/following{/other_user}","gists_url":"https://api.github.com/users/klkelley/gists{/gist_id}","starred_url":"https://api.github.com/users/klkelley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klkelley/subscriptions","organizations_url":"https://api.github.com/users/klkelley/orgs","repos_url":"https://api.github.com/users/klkelley/repos","events_url":"https://api.github.com/users/klkelley/events{/privacy}","received_events_url":"https://api.github.com/users/klkelley/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/klkelley/tictactoe-clojure","description":"TicTacToe in Clojure ","fork":false,"url":"https://api.github.com/repos/klkelley/tictactoe-clojure","forks_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/forks","keys_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/keys{/key_id}","collaborators_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/teams","hooks_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/hooks","issue_events_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/issues/events{/number}","events_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/events","assignees_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/assignees{/user}","branches_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/branches{/branch}","tags_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/tags","blobs_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/git/refs{/sha}","trees_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/git/trees{/sha}","statuses_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/statuses/{sha}","languages_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/languages","stargazers_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/stargazers","contributors_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/contributors","subscribers_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/subscribers","subscription_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/subscription","commits_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/commits{/sha}","git_commits_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/git/commits{/sha}","comments_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/comments{/number}","issue_comment_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/issues/comments{/number}","contents_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/contents/{+path}","compare_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/compare/{base}...{head}","merges_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/merges","archive_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/downloads","issues_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/issues{/number}","pulls_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/pulls{/number}","milestones_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/milestones{/number}","notifications_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/labels{/name}","releases_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/releases{/id}","deployments_url":"https://api.github.com/repos/klkelley/tictactoe-clojure/deployments","created_at":"2018-02-09T20:35:42Z","updated_at":"2018-02-09T20:40:52Z","pushed_at":"2018-02-20T18:54:45Z","git_url":"git://github.com/klkelley/tictactoe-clojure.git","ssh_url":"git@github.com:klkelley/tictactoe-clojure.git","clone_url":"https://github.com/klkelley/tictactoe-clojure.git","svn_url":"https://github.com/klkelley/tictactoe-clojure","homepage":"","size":48,"stargazers_count":0,"watchers_count":0,"language":"Clojure","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"epl-1.0","name":"Eclipse Public License 1.0","spdx_id":"EPL-1.0","url":"https://api.github.com/licenses/epl-1.0"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/klkelley/tictactoe-clojure/pulls/4"},"html":{"href":"https://github.com/klkelley/tictactoe-clojure/pull/4"},"issue":{"href":"https://api.github.com/repos/klkelley/tictactoe-clojure/issues/4"},"comments":{"href":"https://api.github.com/repos/klkelley/tictactoe-clojure/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/klkelley/tictactoe-clojure/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/klkelley/tictactoe-clojure/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/klkelley/tictactoe-clojure/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/klkelley/tictactoe-clojure/statuses/b94dbdf81b45286a3ef0c91aaf9d6f1ee4a7278d"}},"author_association":"OWNER"}}
{"actor":{"display_login":"aaronlahey"}}