{"action":"created","comment":{"url":"https://api.github.com/repos/Armageddontoday/Hellow-world/pulls/comments/86384154","pull_request_review_id":7045186,"id":86384154,"diff_hunk":"@@ -0,0 +1,100 @@\n+﻿using System;\n+using System.Collections.Generic;\n+using System.Linq;\n+using System.Text;\n+using System.Threading.Tasks;\n+\n+namespace HellowWorld\n+{\n+\n+    class MultiplicationTester\n+    {\n+        //т.к. эти переменные постоянно используются в разных методах, вынес их в общий доступ для всего класса\n+        UIHelper uiHelper = new UIHelper();\n+       \n+        public int StartTest()\n+        {\n+            var status = RoundStatuses.initial;\n+            while (true) \n+            {                     \n+                var newTask =  PrepareNewTask();                \n+                status = StartTestRound(newTask, status);\n+                if (status == RoundStatuses.next)\n+                    continue; //при \"next\"- новая итерация\n+                if (status == RoundStatuses.exit)\n+                {\n+                    return 1;\n+                }\n+                if (status == RoundStatuses.correctAnswer)\n+                {\n+                    uiHelper.ShowCorrectAnswer(newTask);                    \n+                    continue;\n+                }\n+            }           \n+        }        \n+        private enum RoundStatuses //\n+        {\n+            initial,                        \n+            next,\n+            correctAnswer,\n+            exit\n+        }\n+\n+        private RoundStatuses StartTestRound(Task task, RoundStatuses status)\n+        {\n+            var userInputAnalyzer = new UserInputAnalyzer();                       \n+            if (status !=RoundStatuses.correctAnswer)\n+            {\n+                \n+                uiHelper.ShowGreetingMessage();\n+                uiHelper.ShowCurrentTask(task);\n+            }\n+            else\n+                uiHelper.ShowCurrentTask(task);\n+            while (true)\n+            {    \n+                string userInput = uiHelper.GetUserAnswer();//запрос ответа\n+                if (userInputAnalyzer.UserInputIsExit(userInput))//проверка на команду выход\n+                {\n+                    return RoundStatuses.exit;\n+                }\n+                if (userInputAnalyzer.UserInputIsNext(userInput))//проверка на команду следующего варианта\n+                {\n+                    return RoundStatuses.next;\n+                }\n+                if (userInputAnalyzer.UserInputIsNumber(userInput))//проверка введено ли число\n+                {\n+                    if (userInputAnalyzer.UserInputIsCorrectAnswer(task, userInput))//если да, то правильный ли ответ\n+                    {                         \n+                        return RoundStatuses.correctAnswer;\n+                        //при правильном ответе нужны новые значение Task, поэтому  используется\n+                        //тот же механизм, что и при  команде Next, только в данном случае \n+                        //выводится сообщение о успехе \n+                    }\n+                    else\n+                    {\n+                        uiHelper.ShowWrongAnswer(task, int.Parse(userInput));\n+                        continue;\n+                    }\n+                }\n+                else\n+                {\n+                    uiHelper.ShowErrorMessage();\n+                    uiHelper.ShowCurrentTask(task);","path":"hellow world/multiplicationTester.cs","position":83,"original_position":83,"commit_id":"51b2483107fd0d804531099e7112d08ccac600c6","original_commit_id":"51b2483107fd0d804531099e7112d08ccac600c6","user":{"login":"rZinnatov","id":6709299,"avatar_url":"https://avatars.githubusercontent.com/u/6709299?v=3","gravatar_id":"","url":"https://api.github.com/users/rZinnatov","html_url":"https://github.com/rZinnatov","followers_url":"https://api.github.com/users/rZinnatov/followers","following_url":"https://api.github.com/users/rZinnatov/following{/other_user}","gists_url":"https://api.github.com/users/rZinnatov/gists{/gist_id}","starred_url":"https://api.github.com/users/rZinnatov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rZinnatov/subscriptions","organizations_url":"https://api.github.com/users/rZinnatov/orgs","repos_url":"https://api.github.com/users/rZinnatov/repos","events_url":"https://api.github.com/users/rZinnatov/events{/privacy}","received_events_url":"https://api.github.com/users/rZinnatov/received_events","type":"User","site_admin":false},"body":"Мне кажется нелогичным, что текущая задача выводится на экран в случае,  если пользователь ввёл не число","created_at":"2016-11-03T16:24:34Z","updated_at":"2016-11-03T16:24:34Z","html_url":"https://github.com/Armageddontoday/Hellow-world/pull/3#discussion_r86384154","pull_request_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/Armageddontoday/Hellow-world/pulls/comments/86384154"},"html":{"href":"https://github.com/Armageddontoday/Hellow-world/pull/3#discussion_r86384154"},"pull_request":{"href":"https://api.github.com/repos/Armageddontoday/Hellow-world/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/Armageddontoday/Hellow-world/pulls/3","id":86578207,"html_url":"https://github.com/Armageddontoday/Hellow-world/pull/3","diff_url":"https://github.com/Armageddontoday/Hellow-world/pull/3.diff","patch_url":"https://github.com/Armageddontoday/Hellow-world/pull/3.patch","issue_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/issues/3","number":3,"state":"open","locked":false,"title":"CamelCase & MultiplicationTest","user":{"login":"Armageddontoday","id":22130518,"avatar_url":"https://avatars.githubusercontent.com/u/22130518?v=3","gravatar_id":"","url":"https://api.github.com/users/Armageddontoday","html_url":"https://github.com/Armageddontoday","followers_url":"https://api.github.com/users/Armageddontoday/followers","following_url":"https://api.github.com/users/Armageddontoday/following{/other_user}","gists_url":"https://api.github.com/users/Armageddontoday/gists{/gist_id}","starred_url":"https://api.github.com/users/Armageddontoday/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Armageddontoday/subscriptions","organizations_url":"https://api.github.com/users/Armageddontoday/orgs","repos_url":"https://api.github.com/users/Armageddontoday/repos","events_url":"https://api.github.com/users/Armageddontoday/events{/privacy}","received_events_url":"https://api.github.com/users/Armageddontoday/received_events","type":"User","site_admin":false},"body":"MultiplicationTest added\n","created_at":"2016-09-23T20:45:32Z","updated_at":"2016-11-03T16:29:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6519effbe9c41b1130e7ee65a3b8908fea137392","assignee":{"login":"Armageddontoday","id":22130518,"avatar_url":"https://avatars.githubusercontent.com/u/22130518?v=3","gravatar_id":"","url":"https://api.github.com/users/Armageddontoday","html_url":"https://github.com/Armageddontoday","followers_url":"https://api.github.com/users/Armageddontoday/followers","following_url":"https://api.github.com/users/Armageddontoday/following{/other_user}","gists_url":"https://api.github.com/users/Armageddontoday/gists{/gist_id}","starred_url":"https://api.github.com/users/Armageddontoday/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Armageddontoday/subscriptions","organizations_url":"https://api.github.com/users/Armageddontoday/orgs","repos_url":"https://api.github.com/users/Armageddontoday/repos","events_url":"https://api.github.com/users/Armageddontoday/events{/privacy}","received_events_url":"https://api.github.com/users/Armageddontoday/received_events","type":"User","site_admin":false},"assignees":[{"login":"Armageddontoday","id":22130518,"avatar_url":"https://avatars.githubusercontent.com/u/22130518?v=3","gravatar_id":"","url":"https://api.github.com/users/Armageddontoday","html_url":"https://github.com/Armageddontoday","followers_url":"https://api.github.com/users/Armageddontoday/followers","following_url":"https://api.github.com/users/Armageddontoday/following{/other_user}","gists_url":"https://api.github.com/users/Armageddontoday/gists{/gist_id}","starred_url":"https://api.github.com/users/Armageddontoday/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Armageddontoday/subscriptions","organizations_url":"https://api.github.com/users/Armageddontoday/orgs","repos_url":"https://api.github.com/users/Armageddontoday/repos","events_url":"https://api.github.com/users/Armageddontoday/events{/privacy}","received_events_url":"https://api.github.com/users/Armageddontoday/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/pulls/3/commits","review_comments_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/pulls/3/comments","review_comment_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/issues/3/comments","statuses_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/statuses/51b2483107fd0d804531099e7112d08ccac600c6","head":{"label":"Armageddontoday:CamelCase","ref":"CamelCase","sha":"51b2483107fd0d804531099e7112d08ccac600c6","user":{"login":"Armageddontoday","id":22130518,"avatar_url":"https://avatars.githubusercontent.com/u/22130518?v=3","gravatar_id":"","url":"https://api.github.com/users/Armageddontoday","html_url":"https://github.com/Armageddontoday","followers_url":"https://api.github.com/users/Armageddontoday/followers","following_url":"https://api.github.com/users/Armageddontoday/following{/other_user}","gists_url":"https://api.github.com/users/Armageddontoday/gists{/gist_id}","starred_url":"https://api.github.com/users/Armageddontoday/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Armageddontoday/subscriptions","organizations_url":"https://api.github.com/users/Armageddontoday/orgs","repos_url":"https://api.github.com/users/Armageddontoday/repos","events_url":"https://api.github.com/users/Armageddontoday/events{/privacy}","received_events_url":"https://api.github.com/users/Armageddontoday/received_events","type":"User","site_admin":false},"repo":{"id":68649249,"name":"Hellow-world","full_name":"Armageddontoday/Hellow-world","owner":{"login":"Armageddontoday","id":22130518,"avatar_url":"https://avatars.githubusercontent.com/u/22130518?v=3","gravatar_id":"","url":"https://api.github.com/users/Armageddontoday","html_url":"https://github.com/Armageddontoday","followers_url":"https://api.github.com/users/Armageddontoday/followers","following_url":"https://api.github.com/users/Armageddontoday/following{/other_user}","gists_url":"https://api.github.com/users/Armageddontoday/gists{/gist_id}","starred_url":"https://api.github.com/users/Armageddontoday/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Armageddontoday/subscriptions","organizations_url":"https://api.github.com/users/Armageddontoday/orgs","repos_url":"https://api.github.com/users/Armageddontoday/repos","events_url":"https://api.github.com/users/Armageddontoday/events{/privacy}","received_events_url":"https://api.github.com/users/Armageddontoday/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Armageddontoday/Hellow-world","description":"First step","fork":false,"url":"https://api.github.com/repos/Armageddontoday/Hellow-world","forks_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/forks","keys_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/teams","hooks_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/hooks","issue_events_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/issues/events{/number}","events_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/events","assignees_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/assignees{/user}","branches_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/branches{/branch}","tags_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/tags","blobs_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/git/refs{/sha}","trees_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/statuses/{sha}","languages_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/languages","stargazers_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/stargazers","contributors_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/contributors","subscribers_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/subscribers","subscription_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/subscription","commits_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/commits{/sha}","git_commits_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/git/commits{/sha}","comments_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/comments{/number}","issue_comment_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/issues/comments{/number}","contents_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/contents/{+path}","compare_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/merges","archive_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/downloads","issues_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/issues{/number}","pulls_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/pulls{/number}","milestones_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/milestones{/number}","notifications_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/labels{/name}","releases_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/releases{/id}","deployments_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/deployments","created_at":"2016-09-19T21:42:59Z","updated_at":"2016-09-19T21:43:19Z","pushed_at":"2016-11-03T16:08:16Z","git_url":"git://github.com/Armageddontoday/Hellow-world.git","ssh_url":"git@github.com:Armageddontoday/Hellow-world.git","clone_url":"https://github.com/Armageddontoday/Hellow-world.git","svn_url":"https://github.com/Armageddontoday/Hellow-world","homepage":null,"size":61,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"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":"Armageddontoday:master","ref":"master","sha":"5e3cfc84261d69c737fc441e3da61a95941db10d","user":{"login":"Armageddontoday","id":22130518,"avatar_url":"https://avatars.githubusercontent.com/u/22130518?v=3","gravatar_id":"","url":"https://api.github.com/users/Armageddontoday","html_url":"https://github.com/Armageddontoday","followers_url":"https://api.github.com/users/Armageddontoday/followers","following_url":"https://api.github.com/users/Armageddontoday/following{/other_user}","gists_url":"https://api.github.com/users/Armageddontoday/gists{/gist_id}","starred_url":"https://api.github.com/users/Armageddontoday/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Armageddontoday/subscriptions","organizations_url":"https://api.github.com/users/Armageddontoday/orgs","repos_url":"https://api.github.com/users/Armageddontoday/repos","events_url":"https://api.github.com/users/Armageddontoday/events{/privacy}","received_events_url":"https://api.github.com/users/Armageddontoday/received_events","type":"User","site_admin":false},"repo":{"id":68649249,"name":"Hellow-world","full_name":"Armageddontoday/Hellow-world","owner":{"login":"Armageddontoday","id":22130518,"avatar_url":"https://avatars.githubusercontent.com/u/22130518?v=3","gravatar_id":"","url":"https://api.github.com/users/Armageddontoday","html_url":"https://github.com/Armageddontoday","followers_url":"https://api.github.com/users/Armageddontoday/followers","following_url":"https://api.github.com/users/Armageddontoday/following{/other_user}","gists_url":"https://api.github.com/users/Armageddontoday/gists{/gist_id}","starred_url":"https://api.github.com/users/Armageddontoday/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Armageddontoday/subscriptions","organizations_url":"https://api.github.com/users/Armageddontoday/orgs","repos_url":"https://api.github.com/users/Armageddontoday/repos","events_url":"https://api.github.com/users/Armageddontoday/events{/privacy}","received_events_url":"https://api.github.com/users/Armageddontoday/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Armageddontoday/Hellow-world","description":"First step","fork":false,"url":"https://api.github.com/repos/Armageddontoday/Hellow-world","forks_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/forks","keys_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/teams","hooks_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/hooks","issue_events_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/issues/events{/number}","events_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/events","assignees_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/assignees{/user}","branches_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/branches{/branch}","tags_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/tags","blobs_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/git/refs{/sha}","trees_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/statuses/{sha}","languages_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/languages","stargazers_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/stargazers","contributors_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/contributors","subscribers_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/subscribers","subscription_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/subscription","commits_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/commits{/sha}","git_commits_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/git/commits{/sha}","comments_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/comments{/number}","issue_comment_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/issues/comments{/number}","contents_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/contents/{+path}","compare_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/merges","archive_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/downloads","issues_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/issues{/number}","pulls_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/pulls{/number}","milestones_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/milestones{/number}","notifications_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/labels{/name}","releases_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/releases{/id}","deployments_url":"https://api.github.com/repos/Armageddontoday/Hellow-world/deployments","created_at":"2016-09-19T21:42:59Z","updated_at":"2016-09-19T21:43:19Z","pushed_at":"2016-11-03T16:08:16Z","git_url":"git://github.com/Armageddontoday/Hellow-world.git","ssh_url":"git@github.com:Armageddontoday/Hellow-world.git","clone_url":"https://github.com/Armageddontoday/Hellow-world.git","svn_url":"https://github.com/Armageddontoday/Hellow-world","homepage":null,"size":61,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"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"}},"_links":{"self":{"href":"https://api.github.com/repos/Armageddontoday/Hellow-world/pulls/3"},"html":{"href":"https://github.com/Armageddontoday/Hellow-world/pull/3"},"issue":{"href":"https://api.github.com/repos/Armageddontoday/Hellow-world/issues/3"},"comments":{"href":"https://api.github.com/repos/Armageddontoday/Hellow-world/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/Armageddontoday/Hellow-world/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/Armageddontoday/Hellow-world/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Armageddontoday/Hellow-world/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/Armageddontoday/Hellow-world/statuses/51b2483107fd0d804531099e7112d08ccac600c6"}}}}
{"actor":{"display_login":"rZinnatov"}}