{"action":"created","comment":{"url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/pulls/comments/85300266","pull_request_review_id":6023041,"id":85300266,"diff_hunk":"@@ -0,0 +1,47 @@\n+```\r\n+guessesTaken = 0\r\n+likenessScore = 0\r\n+secretWord = ...\t\t\t\t//pick the secret word, I assume from a predetermined list.\r\n+n = secretWord.length\t\t\t\t//number of letters i.e if the list was a list of arrays, n = arrayLength\r\n+\r\n+print \"The word to guess has \" n \" letters\"\r\n+\r\n+while (true) loop\r\n+\tif (guessesTaken < 4)\t\r\n+\t\tguessesTaken += 1\t\t//repeat for loop 4 times for 4 guesses\r\n+\t\tguessAccepted = false\r\n+\r\n+\t\twhile (guessAccepted == false) loop\r\n+\t\t\tprint \"Enter your \" n \" letter guess\"\r\n+\t\t\tread guess\r\n+\t\t\tguessLength = guess.length\r\n+\t\t\t\t\t\t//if read is reading a string, then will need to convert to same format as guess\r\n+\t\t\t\t\t\t//i.e. stringToArray command. As long as each character can be read and the \r\n+\t\t\t\t\t\t//number of characters can be determined then is fine.\r\n+\t\t\tif (guessLength == n)\r\n+\t\t\t\tguessAccepted = true\r\n+\t\t\telse\r\n+\t\t\t\tprint \"guessed word must be \" n \" letters long, try again\"\r\n+\t\t\r\n+\t\t\r\n+\t\t\t\t\t\t//now we have the an applicable guess of the correct length we can compare it against the secret word\r\n+\t\tfor (i) in range (0 to n)\r\n+\t\t\t\t\t\t//comparing each letter in turn\r\n+\t\t\tif (guess[i] == secretWord[i])\r\n+\t\t\t\tlikenessScore += 1\r\n+\r\n+\t\tif (likenessScore == n)\t\t//i.e. if (guess == secretWord)\r\n+\t\t\tprint \"You win!\"\r\n+\t\t\tprint \"You did it in \" guessesTaken \" guesses.\"\r\n+\t\t\tend\t\t\t//finish\r\n+\t\telse\r\n+\t\t\tprint \"incorrect\"\r\n+\t\t\tprint \"Likeness score: \" likenessScore\r\n+\t\r\n+\telse\r\n+\t\tprint \"Game Over\"\r\n+\t\tprint \"You have run out of guesses\"\r\n+\t\tprint \"The correct answer was \" secretWord\r","path":"worksheet_B/README.md","position":44,"original_position":44,"commit_id":"32b2f0a690877fc6000d0658f3393c645eb34133","original_commit_id":"32b2f0a690877fc6000d0658f3393c645eb34133","user":{"login":"edpowley","id":4038033,"avatar_url":"https://avatars.githubusercontent.com/u/4038033?v=3","gravatar_id":"","url":"https://api.github.com/users/edpowley","html_url":"https://github.com/edpowley","followers_url":"https://api.github.com/users/edpowley/followers","following_url":"https://api.github.com/users/edpowley/following{/other_user}","gists_url":"https://api.github.com/users/edpowley/gists{/gist_id}","starred_url":"https://api.github.com/users/edpowley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edpowley/subscriptions","organizations_url":"https://api.github.com/users/edpowley/orgs","repos_url":"https://api.github.com/users/edpowley/repos","events_url":"https://api.github.com/users/edpowley/events{/privacy}","received_events_url":"https://api.github.com/users/edpowley/received_events","type":"User","site_admin":false},"body":"You need to break out of the while(true) loop here, otherwise the program will go into an infinite loop of printing these three lines (or maybe that's what you intended...?)","created_at":"2016-10-27T09:35:20Z","updated_at":"2016-10-27T09:35:20Z","html_url":"https://github.com/Falmouth-Games-Academy/comp110-worksheets/pull/38#discussion_r85300266","pull_request_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/pulls/38","_links":{"self":{"href":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/pulls/comments/85300266"},"html":{"href":"https://github.com/Falmouth-Games-Academy/comp110-worksheets/pull/38#discussion_r85300266"},"pull_request":{"href":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/pulls/38"}}},"pull_request":{"url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/pulls/38","id":88639370,"html_url":"https://github.com/Falmouth-Games-Academy/comp110-worksheets/pull/38","diff_url":"https://github.com/Falmouth-Games-Academy/comp110-worksheets/pull/38.diff","patch_url":"https://github.com/Falmouth-Games-Academy/comp110-worksheets/pull/38.patch","issue_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/issues/38","number":38,"state":"open","locked":false,"title":"Worksheet_B","user":{"login":"Stompyy","id":21989527,"avatar_url":"https://avatars.githubusercontent.com/u/21989527?v=3","gravatar_id":"","url":"https://api.github.com/users/Stompyy","html_url":"https://github.com/Stompyy","followers_url":"https://api.github.com/users/Stompyy/followers","following_url":"https://api.github.com/users/Stompyy/following{/other_user}","gists_url":"https://api.github.com/users/Stompyy/gists{/gist_id}","starred_url":"https://api.github.com/users/Stompyy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stompyy/subscriptions","organizations_url":"https://api.github.com/users/Stompyy/orgs","repos_url":"https://api.github.com/users/Stompyy/repos","events_url":"https://api.github.com/users/Stompyy/events{/privacy}","received_events_url":"https://api.github.com/users/Stompyy/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-10T10:23:20Z","updated_at":"2016-10-27T09:44:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"657784169d1b70a9e17ec69bc154cac99fa4b79c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/pulls/38/commits","review_comments_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/pulls/38/comments","review_comment_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/issues/38/comments","statuses_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/statuses/32b2f0a690877fc6000d0658f3393c645eb34133","head":{"label":"Stompyy:master","ref":"master","sha":"32b2f0a690877fc6000d0658f3393c645eb34133","user":{"login":"Stompyy","id":21989527,"avatar_url":"https://avatars.githubusercontent.com/u/21989527?v=3","gravatar_id":"","url":"https://api.github.com/users/Stompyy","html_url":"https://github.com/Stompyy","followers_url":"https://api.github.com/users/Stompyy/followers","following_url":"https://api.github.com/users/Stompyy/following{/other_user}","gists_url":"https://api.github.com/users/Stompyy/gists{/gist_id}","starred_url":"https://api.github.com/users/Stompyy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stompyy/subscriptions","organizations_url":"https://api.github.com/users/Stompyy/orgs","repos_url":"https://api.github.com/users/Stompyy/repos","events_url":"https://api.github.com/users/Stompyy/events{/privacy}","received_events_url":"https://api.github.com/users/Stompyy/received_events","type":"User","site_admin":false},"repo":{"id":68746638,"name":"comp110-worksheets","full_name":"Stompyy/comp110-worksheets","owner":{"login":"Stompyy","id":21989527,"avatar_url":"https://avatars.githubusercontent.com/u/21989527?v=3","gravatar_id":"","url":"https://api.github.com/users/Stompyy","html_url":"https://github.com/Stompyy","followers_url":"https://api.github.com/users/Stompyy/followers","following_url":"https://api.github.com/users/Stompyy/following{/other_user}","gists_url":"https://api.github.com/users/Stompyy/gists{/gist_id}","starred_url":"https://api.github.com/users/Stompyy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stompyy/subscriptions","organizations_url":"https://api.github.com/users/Stompyy/orgs","repos_url":"https://api.github.com/users/Stompyy/repos","events_url":"https://api.github.com/users/Stompyy/events{/privacy}","received_events_url":"https://api.github.com/users/Stompyy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Stompyy/comp110-worksheets","description":"Reflecting on programming and the principles of computing, in addition to learning how to annotate source code.","fork":true,"url":"https://api.github.com/repos/Stompyy/comp110-worksheets","forks_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/forks","keys_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/teams","hooks_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/hooks","issue_events_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/issues/events{/number}","events_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/events","assignees_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/assignees{/user}","branches_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/branches{/branch}","tags_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/tags","blobs_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/git/refs{/sha}","trees_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/statuses/{sha}","languages_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/languages","stargazers_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/stargazers","contributors_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/contributors","subscribers_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/subscribers","subscription_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/subscription","commits_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/commits{/sha}","git_commits_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/git/commits{/sha}","comments_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/comments{/number}","issue_comment_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/issues/comments{/number}","contents_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/contents/{+path}","compare_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/merges","archive_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/downloads","issues_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/issues{/number}","pulls_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/pulls{/number}","milestones_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/milestones{/number}","notifications_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/labels{/name}","releases_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/releases{/id}","deployments_url":"https://api.github.com/repos/Stompyy/comp110-worksheets/deployments","created_at":"2016-09-20T19:35:22Z","updated_at":"2016-09-17T17:21:21Z","pushed_at":"2016-10-21T11:34:45Z","git_url":"git://github.com/Stompyy/comp110-worksheets.git","ssh_url":"git@github.com:Stompyy/comp110-worksheets.git","clone_url":"https://github.com/Stompyy/comp110-worksheets.git","svn_url":"https://github.com/Stompyy/comp110-worksheets","homepage":"","size":5761,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"Falmouth-Games-Academy:master","ref":"master","sha":"2154a5a6f8d28997ab86fb60c97fd10cbb1e8a28","user":{"login":"Falmouth-Games-Academy","id":13518108,"avatar_url":"https://avatars.githubusercontent.com/u/13518108?v=3","gravatar_id":"","url":"https://api.github.com/users/Falmouth-Games-Academy","html_url":"https://github.com/Falmouth-Games-Academy","followers_url":"https://api.github.com/users/Falmouth-Games-Academy/followers","following_url":"https://api.github.com/users/Falmouth-Games-Academy/following{/other_user}","gists_url":"https://api.github.com/users/Falmouth-Games-Academy/gists{/gist_id}","starred_url":"https://api.github.com/users/Falmouth-Games-Academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Falmouth-Games-Academy/subscriptions","organizations_url":"https://api.github.com/users/Falmouth-Games-Academy/orgs","repos_url":"https://api.github.com/users/Falmouth-Games-Academy/repos","events_url":"https://api.github.com/users/Falmouth-Games-Academy/events{/privacy}","received_events_url":"https://api.github.com/users/Falmouth-Games-Academy/received_events","type":"Organization","site_admin":false},"repo":{"id":43419657,"name":"comp110-worksheets","full_name":"Falmouth-Games-Academy/comp110-worksheets","owner":{"login":"Falmouth-Games-Academy","id":13518108,"avatar_url":"https://avatars.githubusercontent.com/u/13518108?v=3","gravatar_id":"","url":"https://api.github.com/users/Falmouth-Games-Academy","html_url":"https://github.com/Falmouth-Games-Academy","followers_url":"https://api.github.com/users/Falmouth-Games-Academy/followers","following_url":"https://api.github.com/users/Falmouth-Games-Academy/following{/other_user}","gists_url":"https://api.github.com/users/Falmouth-Games-Academy/gists{/gist_id}","starred_url":"https://api.github.com/users/Falmouth-Games-Academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Falmouth-Games-Academy/subscriptions","organizations_url":"https://api.github.com/users/Falmouth-Games-Academy/orgs","repos_url":"https://api.github.com/users/Falmouth-Games-Academy/repos","events_url":"https://api.github.com/users/Falmouth-Games-Academy/events{/privacy}","received_events_url":"https://api.github.com/users/Falmouth-Games-Academy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Falmouth-Games-Academy/comp110-worksheets","description":"Reflecting on programming and the principles of computing, in addition to learning how to annotate source code.","fork":false,"url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets","forks_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/forks","keys_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/teams","hooks_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/hooks","issue_events_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/issues/events{/number}","events_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/events","assignees_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/assignees{/user}","branches_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/branches{/branch}","tags_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/tags","blobs_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/git/refs{/sha}","trees_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/statuses/{sha}","languages_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/languages","stargazers_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/stargazers","contributors_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/contributors","subscribers_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/subscribers","subscription_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/subscription","commits_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/commits{/sha}","git_commits_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/git/commits{/sha}","comments_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/comments{/number}","issue_comment_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/issues/comments{/number}","contents_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/contents/{+path}","compare_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/merges","archive_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/downloads","issues_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/issues{/number}","pulls_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/pulls{/number}","milestones_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/milestones{/number}","notifications_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/labels{/name}","releases_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/releases{/id}","deployments_url":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/deployments","created_at":"2015-09-30T07:54:37Z","updated_at":"2016-09-17T17:21:21Z","pushed_at":"2016-10-24T10:33:09Z","git_url":"git://github.com/Falmouth-Games-Academy/comp110-worksheets.git","ssh_url":"git@github.com:Falmouth-Games-Academy/comp110-worksheets.git","clone_url":"https://github.com/Falmouth-Games-Academy/comp110-worksheets.git","svn_url":"https://github.com/Falmouth-Games-Academy/comp110-worksheets","homepage":"","size":167385,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":37,"mirror_url":null,"open_issues_count":11,"forks":37,"open_issues":11,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/pulls/38"},"html":{"href":"https://github.com/Falmouth-Games-Academy/comp110-worksheets/pull/38"},"issue":{"href":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/issues/38"},"comments":{"href":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/Falmouth-Games-Academy/comp110-worksheets/statuses/32b2f0a690877fc6000d0658f3393c645eb34133"}}}}
{"actor":{"display_login":"edpowley"}}