{"action":"created","comment":{"url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/pulls/comments/27340592","id":27340592,"diff_hunk":"@@ -0,0 +1,66 @@\n+###############################################################################\n+#\n+# We're ready to program! To practice our Ruby skills lets create a secret\n+# number game. In this game players have three tries to guess a secret number\n+# between 1 and 10.\n+#\n+# Here are some guidelines to building your game:\n+#\n+#   Intros\n+#   - Welcome the player to your game. Let them know who created the game.\n+#   - Ask for the player's name then personally greet them by printing to the\n+#     screen, \"Hi player_name!\"\n+#   - Any good game will communicate the rules. Let the player know they must\n+#     guess a number between 1 and 10 and that they only have 3 tries to do so.\n+#\n+#   Functionality:\n+#     - Manually specify the secret number in a variable. Choose a random \n+#       number between 1 and 10.\n+#     - Ask the user for their guess.\n+#     - Verify if they were correct. If the player guesses correctly they win\n+#       the game, they should be congratulated and the game should end.\n+#     - If they guess incorrectly, give the player some direction. If they\n+#       guess too high let them know, if they guess too low, let them know.\n+#     - Don't forget to let your players know how many guesses they have left.\n+#       Your game should say something like:\n+#         \"You have X guesses before the game is over enter a another number\"\n+#     - If they don't guess correctly after 3 tries, display that the player\n+#       lost and that the game is over. Be nice and let them know what the\n+#       `secret_number` was.\n+#\n+###############################################################################\n+\n+\n+def secret_number","path":"rohan_siddhanti/secret_number.rb","position":34,"original_position":34,"commit_id":"ad62bba3d870426d8f31656a85052cb9e521faea","original_commit_id":"ad62bba3d870426d8f31656a85052cb9e521faea","user":{"login":"bswinnerton","id":934497,"avatar_url":"https://avatars.githubusercontent.com/u/934497?v=3","gravatar_id":"","url":"https://api.github.com/users/bswinnerton","html_url":"https://github.com/bswinnerton","followers_url":"https://api.github.com/users/bswinnerton/followers","following_url":"https://api.github.com/users/bswinnerton/following{/other_user}","gists_url":"https://api.github.com/users/bswinnerton/gists{/gist_id}","starred_url":"https://api.github.com/users/bswinnerton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bswinnerton/subscriptions","organizations_url":"https://api.github.com/users/bswinnerton/orgs","repos_url":"https://api.github.com/users/bswinnerton/repos","events_url":"https://api.github.com/users/bswinnerton/events{/privacy}","received_events_url":"https://api.github.com/users/bswinnerton/received_events","type":"User","site_admin":false},"body":"Rather than having the entire application run inside a method, we typically want to use methods to break up discrete, repeating functionality for your application. For example, you could have something like this:\r\n\r\n```ruby\r\ndef intro\r\n  puts \"Welcome to the secret number game, created by Rohan\"\r\n  puts \"What is your name?\"\r\n  player_name = gets.chomp\r\n  puts \"Hi #{player_name}!\"\r\n  puts \"Welcome to the secret number game. You have three tries to guess my number, which is between 1 and 10, inclusive. Each time you guess I'l let you know if the guess was too high or too low. Good luck!\"\r\nend\r\n```\r\n\r\nWhich represents only the first part of the application (that only needs to be executed once), while most of the rest of it may need to be executed three more times.","created_at":"2015-03-28T00:54:50Z","updated_at":"2015-03-28T00:54:50Z","html_url":"https://github.com/BEWD-NYC-20/secret_number/pull/2#discussion_r27340592","pull_request_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/BEWD-NYC-20/secret_number/pulls/comments/27340592"},"html":{"href":"https://github.com/BEWD-NYC-20/secret_number/pull/2#discussion_r27340592"},"pull_request":{"href":"https://api.github.com/repos/BEWD-NYC-20/secret_number/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/pulls/2","id":31781015,"html_url":"https://github.com/BEWD-NYC-20/secret_number/pull/2","diff_url":"https://github.com/BEWD-NYC-20/secret_number/pull/2.diff","patch_url":"https://github.com/BEWD-NYC-20/secret_number/pull/2.patch","issue_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/issues/2","number":2,"state":"open","locked":false,"title":"Adding secret number homework, hw #1","user":{"login":"Rohansid","id":7819508,"avatar_url":"https://avatars.githubusercontent.com/u/7819508?v=3","gravatar_id":"","url":"https://api.github.com/users/Rohansid","html_url":"https://github.com/Rohansid","followers_url":"https://api.github.com/users/Rohansid/followers","following_url":"https://api.github.com/users/Rohansid/following{/other_user}","gists_url":"https://api.github.com/users/Rohansid/gists{/gist_id}","starred_url":"https://api.github.com/users/Rohansid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rohansid/subscriptions","organizations_url":"https://api.github.com/users/Rohansid/orgs","repos_url":"https://api.github.com/users/Rohansid/repos","events_url":"https://api.github.com/users/Rohansid/events{/privacy}","received_events_url":"https://api.github.com/users/Rohansid/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-23T22:34:21Z","updated_at":"2015-03-28T00:54:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fb29400c2c8215e17ebf2ca08e29ddc8e2607f41","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/pulls/2/commits","review_comments_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/pulls/2/comments","review_comment_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/issues/2/comments","statuses_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/statuses/ad62bba3d870426d8f31656a85052cb9e521faea","head":{"label":"Rohansid:master","ref":"master","sha":"ad62bba3d870426d8f31656a85052cb9e521faea","user":{"login":"Rohansid","id":7819508,"avatar_url":"https://avatars.githubusercontent.com/u/7819508?v=3","gravatar_id":"","url":"https://api.github.com/users/Rohansid","html_url":"https://github.com/Rohansid","followers_url":"https://api.github.com/users/Rohansid/followers","following_url":"https://api.github.com/users/Rohansid/following{/other_user}","gists_url":"https://api.github.com/users/Rohansid/gists{/gist_id}","starred_url":"https://api.github.com/users/Rohansid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rohansid/subscriptions","organizations_url":"https://api.github.com/users/Rohansid/orgs","repos_url":"https://api.github.com/users/Rohansid/repos","events_url":"https://api.github.com/users/Rohansid/events{/privacy}","received_events_url":"https://api.github.com/users/Rohansid/received_events","type":"User","site_admin":false},"repo":{"id":32493311,"name":"secret_number","full_name":"Rohansid/secret_number","owner":{"login":"Rohansid","id":7819508,"avatar_url":"https://avatars.githubusercontent.com/u/7819508?v=3","gravatar_id":"","url":"https://api.github.com/users/Rohansid","html_url":"https://github.com/Rohansid","followers_url":"https://api.github.com/users/Rohansid/followers","following_url":"https://api.github.com/users/Rohansid/following{/other_user}","gists_url":"https://api.github.com/users/Rohansid/gists{/gist_id}","starred_url":"https://api.github.com/users/Rohansid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rohansid/subscriptions","organizations_url":"https://api.github.com/users/Rohansid/orgs","repos_url":"https://api.github.com/users/Rohansid/repos","events_url":"https://api.github.com/users/Rohansid/events{/privacy}","received_events_url":"https://api.github.com/users/Rohansid/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Rohansid/secret_number","description":"Lesson 2 Homework","fork":true,"url":"https://api.github.com/repos/Rohansid/secret_number","forks_url":"https://api.github.com/repos/Rohansid/secret_number/forks","keys_url":"https://api.github.com/repos/Rohansid/secret_number/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Rohansid/secret_number/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Rohansid/secret_number/teams","hooks_url":"https://api.github.com/repos/Rohansid/secret_number/hooks","issue_events_url":"https://api.github.com/repos/Rohansid/secret_number/issues/events{/number}","events_url":"https://api.github.com/repos/Rohansid/secret_number/events","assignees_url":"https://api.github.com/repos/Rohansid/secret_number/assignees{/user}","branches_url":"https://api.github.com/repos/Rohansid/secret_number/branches{/branch}","tags_url":"https://api.github.com/repos/Rohansid/secret_number/tags","blobs_url":"https://api.github.com/repos/Rohansid/secret_number/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Rohansid/secret_number/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Rohansid/secret_number/git/refs{/sha}","trees_url":"https://api.github.com/repos/Rohansid/secret_number/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Rohansid/secret_number/statuses/{sha}","languages_url":"https://api.github.com/repos/Rohansid/secret_number/languages","stargazers_url":"https://api.github.com/repos/Rohansid/secret_number/stargazers","contributors_url":"https://api.github.com/repos/Rohansid/secret_number/contributors","subscribers_url":"https://api.github.com/repos/Rohansid/secret_number/subscribers","subscription_url":"https://api.github.com/repos/Rohansid/secret_number/subscription","commits_url":"https://api.github.com/repos/Rohansid/secret_number/commits{/sha}","git_commits_url":"https://api.github.com/repos/Rohansid/secret_number/git/commits{/sha}","comments_url":"https://api.github.com/repos/Rohansid/secret_number/comments{/number}","issue_comment_url":"https://api.github.com/repos/Rohansid/secret_number/issues/comments{/number}","contents_url":"https://api.github.com/repos/Rohansid/secret_number/contents/{+path}","compare_url":"https://api.github.com/repos/Rohansid/secret_number/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Rohansid/secret_number/merges","archive_url":"https://api.github.com/repos/Rohansid/secret_number/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Rohansid/secret_number/downloads","issues_url":"https://api.github.com/repos/Rohansid/secret_number/issues{/number}","pulls_url":"https://api.github.com/repos/Rohansid/secret_number/pulls{/number}","milestones_url":"https://api.github.com/repos/Rohansid/secret_number/milestones{/number}","notifications_url":"https://api.github.com/repos/Rohansid/secret_number/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Rohansid/secret_number/labels{/name}","releases_url":"https://api.github.com/repos/Rohansid/secret_number/releases{/id}","created_at":"2015-03-19T01:08:45Z","updated_at":"2015-03-22T21:37:47Z","pushed_at":"2015-03-22T21:37:47Z","git_url":"git://github.com/Rohansid/secret_number.git","ssh_url":"git@github.com:Rohansid/secret_number.git","clone_url":"https://github.com/Rohansid/secret_number.git","svn_url":"https://github.com/Rohansid/secret_number","homepage":"https://materials.generalassemb.ly/bewd/new-york-city/20/lessons/2#homework","size":83,"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":"BEWD-NYC-20:master","ref":"master","sha":"279844b4f52cf831a8c3a22f509c55ef9b37e4b6","user":{"login":"BEWD-NYC-20","id":11323865,"avatar_url":"https://avatars.githubusercontent.com/u/11323865?v=3","gravatar_id":"","url":"https://api.github.com/users/BEWD-NYC-20","html_url":"https://github.com/BEWD-NYC-20","followers_url":"https://api.github.com/users/BEWD-NYC-20/followers","following_url":"https://api.github.com/users/BEWD-NYC-20/following{/other_user}","gists_url":"https://api.github.com/users/BEWD-NYC-20/gists{/gist_id}","starred_url":"https://api.github.com/users/BEWD-NYC-20/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BEWD-NYC-20/subscriptions","organizations_url":"https://api.github.com/users/BEWD-NYC-20/orgs","repos_url":"https://api.github.com/users/BEWD-NYC-20/repos","events_url":"https://api.github.com/users/BEWD-NYC-20/events{/privacy}","received_events_url":"https://api.github.com/users/BEWD-NYC-20/received_events","type":"Organization","site_admin":false},"repo":{"id":32484393,"name":"secret_number","full_name":"BEWD-NYC-20/secret_number","owner":{"login":"BEWD-NYC-20","id":11323865,"avatar_url":"https://avatars.githubusercontent.com/u/11323865?v=3","gravatar_id":"","url":"https://api.github.com/users/BEWD-NYC-20","html_url":"https://github.com/BEWD-NYC-20","followers_url":"https://api.github.com/users/BEWD-NYC-20/followers","following_url":"https://api.github.com/users/BEWD-NYC-20/following{/other_user}","gists_url":"https://api.github.com/users/BEWD-NYC-20/gists{/gist_id}","starred_url":"https://api.github.com/users/BEWD-NYC-20/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BEWD-NYC-20/subscriptions","organizations_url":"https://api.github.com/users/BEWD-NYC-20/orgs","repos_url":"https://api.github.com/users/BEWD-NYC-20/repos","events_url":"https://api.github.com/users/BEWD-NYC-20/events{/privacy}","received_events_url":"https://api.github.com/users/BEWD-NYC-20/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BEWD-NYC-20/secret_number","description":"Lesson 2 Homework","fork":false,"url":"https://api.github.com/repos/BEWD-NYC-20/secret_number","forks_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/forks","keys_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/teams","hooks_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/hooks","issue_events_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/issues/events{/number}","events_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/events","assignees_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/assignees{/user}","branches_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/branches{/branch}","tags_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/tags","blobs_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/git/refs{/sha}","trees_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/statuses/{sha}","languages_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/languages","stargazers_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/stargazers","contributors_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/contributors","subscribers_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/subscribers","subscription_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/subscription","commits_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/commits{/sha}","git_commits_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/git/commits{/sha}","comments_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/comments{/number}","issue_comment_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/issues/comments{/number}","contents_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/contents/{+path}","compare_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/merges","archive_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/downloads","issues_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/issues{/number}","pulls_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/pulls{/number}","milestones_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/milestones{/number}","notifications_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/labels{/name}","releases_url":"https://api.github.com/repos/BEWD-NYC-20/secret_number/releases{/id}","created_at":"2015-03-18T21:06:43Z","updated_at":"2015-03-28T00:52:42Z","pushed_at":"2015-03-28T00:52:42Z","git_url":"git://github.com/BEWD-NYC-20/secret_number.git","ssh_url":"git@github.com:BEWD-NYC-20/secret_number.git","clone_url":"https://github.com/BEWD-NYC-20/secret_number.git","svn_url":"https://github.com/BEWD-NYC-20/secret_number","homepage":"https://materials.generalassemb.ly/bewd/new-york-city/20/lessons/2#homework","size":246,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":15,"forks":18,"open_issues":15,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BEWD-NYC-20/secret_number/pulls/2"},"html":{"href":"https://github.com/BEWD-NYC-20/secret_number/pull/2"},"issue":{"href":"https://api.github.com/repos/BEWD-NYC-20/secret_number/issues/2"},"comments":{"href":"https://api.github.com/repos/BEWD-NYC-20/secret_number/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/BEWD-NYC-20/secret_number/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/BEWD-NYC-20/secret_number/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BEWD-NYC-20/secret_number/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/BEWD-NYC-20/secret_number/statuses/ad62bba3d870426d8f31656a85052cb9e521faea"}}}}