{"action":"created","comment":{"url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/pulls/comments/183713939","pull_request_review_id":114762006,"id":183713939,"diff_hunk":"@@ -0,0 +1,212 @@\n+import {currentGame} from '../js/game-model.js';\n+import {timer} from '../js/timer.js';\n+import {getRandomInt} from '../js/utils.js';\n+import {MINIMUM_PLAYERS_LIVES} from '../js/game.js';\n+import {setAnswerResults} from '../js/calculate-score.js';\n+import Application from '../js/application.js';\n+import {WelcomeView} from '../js/welcome-view.js';\n+import {LevelGenreView} from '../js/level-genre-view.js';\n+import {LevelArtistView} from '../js/level-artist-view.js';\n+\n+const ARTIST_PAGE_INDEX = 1;\n+const GENRE_PAGE_INDEX = 2;\n+const LAST_INDEX = 11;\n+\n+export class GamePage {\n+  constructor(model) {\n+    this.model = model(currentGame);\n+    this.init();\n+  }\n+\n+  init() {\n+    if (this.model instanceof WelcomeView) {","path":"js/game-page.js","position":22,"original_position":22,"commit_id":"ee1659f24be4863bef46275ac8b103cc68a2f983","original_commit_id":"ee1659f24be4863bef46275ac8b103cc68a2f983","user":{"login":"TheDarkestDay","id":7871134,"avatar_url":"https://avatars1.githubusercontent.com/u/7871134?v=4","gravatar_id":"","url":"https://api.github.com/users/TheDarkestDay","html_url":"https://github.com/TheDarkestDay","followers_url":"https://api.github.com/users/TheDarkestDay/followers","following_url":"https://api.github.com/users/TheDarkestDay/following{/other_user}","gists_url":"https://api.github.com/users/TheDarkestDay/gists{/gist_id}","starred_url":"https://api.github.com/users/TheDarkestDay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheDarkestDay/subscriptions","organizations_url":"https://api.github.com/users/TheDarkestDay/orgs","repos_url":"https://api.github.com/users/TheDarkestDay/repos","events_url":"https://api.github.com/users/TheDarkestDay/events{/privacy}","received_events_url":"https://api.github.com/users/TheDarkestDay/received_events","type":"User","site_admin":false},"body":"Чтобы избежать вот такой каши, воспользуйся ООП - создай абстрактный класс для презентера - GameScreen, реализуй в нем всю общую логику, определи интерфейс. А затем на каждый экран создай потомка GameScreen, который бы уже отвечал за работу с конкретным экраном игры.","created_at":"2018-04-24T12:43:35Z","updated_at":"2018-04-24T12:46:33Z","html_url":"https://github.com/htmlacademy-ecmascript/334301-guess-melody/pull/8#discussion_r183713939","pull_request_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/pulls/8","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/pulls/comments/183713939"},"html":{"href":"https://github.com/htmlacademy-ecmascript/334301-guess-melody/pull/8#discussion_r183713939"},"pull_request":{"href":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/pulls/8","id":183286006,"html_url":"https://github.com/htmlacademy-ecmascript/334301-guess-melody/pull/8","diff_url":"https://github.com/htmlacademy-ecmascript/334301-guess-melody/pull/8.diff","patch_url":"https://github.com/htmlacademy-ecmascript/334301-guess-melody/pull/8.patch","issue_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/issues/8","number":8,"state":"open","locked":false,"title":"Реконструкция","user":{"login":"Nitraatss","id":33326820,"avatar_url":"https://avatars3.githubusercontent.com/u/33326820?v=4","gravatar_id":"","url":"https://api.github.com/users/Nitraatss","html_url":"https://github.com/Nitraatss","followers_url":"https://api.github.com/users/Nitraatss/followers","following_url":"https://api.github.com/users/Nitraatss/following{/other_user}","gists_url":"https://api.github.com/users/Nitraatss/gists{/gist_id}","starred_url":"https://api.github.com/users/Nitraatss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nitraatss/subscriptions","organizations_url":"https://api.github.com/users/Nitraatss/orgs","repos_url":"https://api.github.com/users/Nitraatss/repos","events_url":"https://api.github.com/users/Nitraatss/events{/privacy}","received_events_url":"https://api.github.com/users/Nitraatss/received_events","type":"User","site_admin":false},"body":"\n\n---\n:mortar_board: [Реконструкция](https://up.htmlacademy.ru/ecmascript/4/user/334301/tasks/10)","created_at":"2018-04-22T18:06:58Z","updated_at":"2018-04-24T12:46:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8919fa2ccde36cd942499517b880bd6add62a895","assignee":{"login":"TheDarkestDay","id":7871134,"avatar_url":"https://avatars1.githubusercontent.com/u/7871134?v=4","gravatar_id":"","url":"https://api.github.com/users/TheDarkestDay","html_url":"https://github.com/TheDarkestDay","followers_url":"https://api.github.com/users/TheDarkestDay/followers","following_url":"https://api.github.com/users/TheDarkestDay/following{/other_user}","gists_url":"https://api.github.com/users/TheDarkestDay/gists{/gist_id}","starred_url":"https://api.github.com/users/TheDarkestDay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheDarkestDay/subscriptions","organizations_url":"https://api.github.com/users/TheDarkestDay/orgs","repos_url":"https://api.github.com/users/TheDarkestDay/repos","events_url":"https://api.github.com/users/TheDarkestDay/events{/privacy}","received_events_url":"https://api.github.com/users/TheDarkestDay/received_events","type":"User","site_admin":false},"assignees":[{"login":"TheDarkestDay","id":7871134,"avatar_url":"https://avatars1.githubusercontent.com/u/7871134?v=4","gravatar_id":"","url":"https://api.github.com/users/TheDarkestDay","html_url":"https://github.com/TheDarkestDay","followers_url":"https://api.github.com/users/TheDarkestDay/followers","following_url":"https://api.github.com/users/TheDarkestDay/following{/other_user}","gists_url":"https://api.github.com/users/TheDarkestDay/gists{/gist_id}","starred_url":"https://api.github.com/users/TheDarkestDay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheDarkestDay/subscriptions","organizations_url":"https://api.github.com/users/TheDarkestDay/orgs","repos_url":"https://api.github.com/users/TheDarkestDay/repos","events_url":"https://api.github.com/users/TheDarkestDay/events{/privacy}","received_events_url":"https://api.github.com/users/TheDarkestDay/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/pulls/8/commits","review_comments_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/pulls/8/comments","review_comment_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/pulls/comments{/number}","comments_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/issues/8/comments","statuses_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/statuses/ee1659f24be4863bef46275ac8b103cc68a2f983","head":{"label":"Nitraatss:module6-task1","ref":"module6-task1","sha":"ee1659f24be4863bef46275ac8b103cc68a2f983","user":{"login":"Nitraatss","id":33326820,"avatar_url":"https://avatars3.githubusercontent.com/u/33326820?v=4","gravatar_id":"","url":"https://api.github.com/users/Nitraatss","html_url":"https://github.com/Nitraatss","followers_url":"https://api.github.com/users/Nitraatss/followers","following_url":"https://api.github.com/users/Nitraatss/following{/other_user}","gists_url":"https://api.github.com/users/Nitraatss/gists{/gist_id}","starred_url":"https://api.github.com/users/Nitraatss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nitraatss/subscriptions","organizations_url":"https://api.github.com/users/Nitraatss/orgs","repos_url":"https://api.github.com/users/Nitraatss/repos","events_url":"https://api.github.com/users/Nitraatss/events{/privacy}","received_events_url":"https://api.github.com/users/Nitraatss/received_events","type":"User","site_admin":false},"repo":{"id":126933979,"name":"334301-guess-melody","full_name":"Nitraatss/334301-guess-melody","owner":{"login":"Nitraatss","id":33326820,"avatar_url":"https://avatars3.githubusercontent.com/u/33326820?v=4","gravatar_id":"","url":"https://api.github.com/users/Nitraatss","html_url":"https://github.com/Nitraatss","followers_url":"https://api.github.com/users/Nitraatss/followers","following_url":"https://api.github.com/users/Nitraatss/following{/other_user}","gists_url":"https://api.github.com/users/Nitraatss/gists{/gist_id}","starred_url":"https://api.github.com/users/Nitraatss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nitraatss/subscriptions","organizations_url":"https://api.github.com/users/Nitraatss/orgs","repos_url":"https://api.github.com/users/Nitraatss/repos","events_url":"https://api.github.com/users/Nitraatss/events{/privacy}","received_events_url":"https://api.github.com/users/Nitraatss/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Nitraatss/334301-guess-melody","description":"Василий Шубин","fork":true,"url":"https://api.github.com/repos/Nitraatss/334301-guess-melody","forks_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/forks","keys_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/teams","hooks_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/hooks","issue_events_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/issues/events{/number}","events_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/events","assignees_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/assignees{/user}","branches_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/branches{/branch}","tags_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/tags","blobs_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/git/refs{/sha}","trees_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/statuses/{sha}","languages_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/languages","stargazers_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/stargazers","contributors_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/contributors","subscribers_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/subscribers","subscription_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/subscription","commits_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/commits{/sha}","git_commits_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/git/commits{/sha}","comments_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/comments{/number}","issue_comment_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/issues/comments{/number}","contents_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/contents/{+path}","compare_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/merges","archive_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/downloads","issues_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/issues{/number}","pulls_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/pulls{/number}","milestones_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/milestones{/number}","notifications_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/labels{/name}","releases_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/releases{/id}","deployments_url":"https://api.github.com/repos/Nitraatss/334301-guess-melody/deployments","created_at":"2018-03-27T05:34:04Z","updated_at":"2018-04-22T13:08:19Z","pushed_at":"2018-04-23T20:52:35Z","git_url":"git://github.com/Nitraatss/334301-guess-melody.git","ssh_url":"git@github.com:Nitraatss/334301-guess-melody.git","clone_url":"https://github.com/Nitraatss/334301-guess-melody.git","svn_url":"https://github.com/Nitraatss/334301-guess-melody","homepage":null,"size":338,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"htmlacademy-ecmascript:master","ref":"master","sha":"5bdd7bf97d85fadc34bcd0bd42f7d455ce809e9e","user":{"login":"htmlacademy-ecmascript","id":22890904,"avatar_url":"https://avatars2.githubusercontent.com/u/22890904?v=4","gravatar_id":"","url":"https://api.github.com/users/htmlacademy-ecmascript","html_url":"https://github.com/htmlacademy-ecmascript","followers_url":"https://api.github.com/users/htmlacademy-ecmascript/followers","following_url":"https://api.github.com/users/htmlacademy-ecmascript/following{/other_user}","gists_url":"https://api.github.com/users/htmlacademy-ecmascript/gists{/gist_id}","starred_url":"https://api.github.com/users/htmlacademy-ecmascript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htmlacademy-ecmascript/subscriptions","organizations_url":"https://api.github.com/users/htmlacademy-ecmascript/orgs","repos_url":"https://api.github.com/users/htmlacademy-ecmascript/repos","events_url":"https://api.github.com/users/htmlacademy-ecmascript/events{/privacy}","received_events_url":"https://api.github.com/users/htmlacademy-ecmascript/received_events","type":"Organization","site_admin":false},"repo":{"id":126876337,"name":"334301-guess-melody","full_name":"htmlacademy-ecmascript/334301-guess-melody","owner":{"login":"htmlacademy-ecmascript","id":22890904,"avatar_url":"https://avatars2.githubusercontent.com/u/22890904?v=4","gravatar_id":"","url":"https://api.github.com/users/htmlacademy-ecmascript","html_url":"https://github.com/htmlacademy-ecmascript","followers_url":"https://api.github.com/users/htmlacademy-ecmascript/followers","following_url":"https://api.github.com/users/htmlacademy-ecmascript/following{/other_user}","gists_url":"https://api.github.com/users/htmlacademy-ecmascript/gists{/gist_id}","starred_url":"https://api.github.com/users/htmlacademy-ecmascript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htmlacademy-ecmascript/subscriptions","organizations_url":"https://api.github.com/users/htmlacademy-ecmascript/orgs","repos_url":"https://api.github.com/users/htmlacademy-ecmascript/repos","events_url":"https://api.github.com/users/htmlacademy-ecmascript/events{/privacy}","received_events_url":"https://api.github.com/users/htmlacademy-ecmascript/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/htmlacademy-ecmascript/334301-guess-melody","description":"Василий Шубин","fork":false,"url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody","forks_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/forks","keys_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/keys{/key_id}","collaborators_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/teams","hooks_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/hooks","issue_events_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/issues/events{/number}","events_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/events","assignees_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/assignees{/user}","branches_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/branches{/branch}","tags_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/tags","blobs_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/git/refs{/sha}","trees_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/git/trees{/sha}","statuses_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/statuses/{sha}","languages_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/languages","stargazers_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/stargazers","contributors_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/contributors","subscribers_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/subscribers","subscription_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/subscription","commits_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/commits{/sha}","git_commits_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/git/commits{/sha}","comments_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/comments{/number}","issue_comment_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/issues/comments{/number}","contents_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/contents/{+path}","compare_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/compare/{base}...{head}","merges_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/merges","archive_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/downloads","issues_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/issues{/number}","pulls_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/pulls{/number}","milestones_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/milestones{/number}","notifications_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/labels{/name}","releases_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/releases{/id}","deployments_url":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/deployments","created_at":"2018-03-26T19:00:55Z","updated_at":"2018-04-22T09:14:53Z","pushed_at":"2018-04-23T20:52:35Z","git_url":"git://github.com/htmlacademy-ecmascript/334301-guess-melody.git","ssh_url":"git@github.com:htmlacademy-ecmascript/334301-guess-melody.git","clone_url":"https://github.com/htmlacademy-ecmascript/334301-guess-melody.git","svn_url":"https://github.com/htmlacademy-ecmascript/334301-guess-melody","homepage":"https://github.com/Nitraatss/334301-guess-melody","size":456,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/pulls/8"},"html":{"href":"https://github.com/htmlacademy-ecmascript/334301-guess-melody/pull/8"},"issue":{"href":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/issues/8"},"comments":{"href":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/htmlacademy-ecmascript/334301-guess-melody/statuses/ee1659f24be4863bef46275ac8b103cc68a2f983"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"TheDarkestDay"}}