{"action":"created","comment":{"url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/pulls/comments/245444504","pull_request_review_id":189557606,"id":245444504,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NTQ0NDUwNA==","diff_hunk":"@@ -0,0 +1,108 @@\n+// Enemies our player must avoid\n+var Enemy = function(x, y) {\n+    // Variables applied to each of our instances go here,\n+    // we've provided one for you to get started\n+\n+    // The image/sprite for our enemies, this uses\n+    // a helper we've provided to easily load images\n+    this.x = x;\n+    this.y = y;\n+    this.speed = randomSpeed(80, 290);\n+    this.sprite = 'images/enemy-bug.png';\n+};\n+\n+function randomSpeed(min, max) {\n+    return Math.random() * (max - min) + min;\n+}\n+\n+// Update the enemy's position, required method for game\n+// Parameter: dt, a time delta between ticks\n+Enemy.prototype.update = function(dt) {\n+    if (this.x < 505) {\n+      this.x += dt * this.speed;\n+    } else {\n+    this.x = -101;\n+    this.speed = randomSpeed(100, 300);\n+    }\n+};\n+\n+// Draw the enemy on the screen, required method for game\n+Enemy.prototype.render = function() {\n+    ctx.drawImage(Resources.get(this.sprite), this.x, this.y);\n+};\n+\n+// Now write your own player class\n+// This class requires an update(), render() and\n+// a handleInput() method.\n+var Player = function() {\n+    this.sprite = 'images/char-boy.png';\n+    this.x = 202;\n+    this.y = 400;\n+};\n+\n+Player.prototype.render = function() {\n+    ctx.drawImage(Resources.get(this.sprite), this.x, this.y);\n+};\n+\n+Player.prototype.toBegin = function(d) {\n+    if (d === 0) {","path":"submissions/Roman-Halenko/js-oop-frogger/js/app.js","position":48,"original_position":48,"commit_id":"c18b386963bbfcc5b311dfd18c00fc8ea0d5524c","original_commit_id":"c18b386963bbfcc5b311dfd18c00fc8ea0d5524c","user":{"login":"AMashoshyna","id":17703790,"node_id":"MDQ6VXNlcjE3NzAzNzkw","avatar_url":"https://avatars0.githubusercontent.com/u/17703790?v=4","gravatar_id":"","url":"https://api.github.com/users/AMashoshyna","html_url":"https://github.com/AMashoshyna","followers_url":"https://api.github.com/users/AMashoshyna/followers","following_url":"https://api.github.com/users/AMashoshyna/following{/other_user}","gists_url":"https://api.github.com/users/AMashoshyna/gists{/gist_id}","starred_url":"https://api.github.com/users/AMashoshyna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AMashoshyna/subscriptions","organizations_url":"https://api.github.com/users/AMashoshyna/orgs","repos_url":"https://api.github.com/users/AMashoshyna/repos","events_url":"https://api.github.com/users/AMashoshyna/events{/privacy}","received_events_url":"https://api.github.com/users/AMashoshyna/received_events","type":"User","site_admin":false},"body":"Could you please explain, what this method is doing? What is `d`?","created_at":"2019-01-04T23:01:48Z","updated_at":"2019-01-04T23:04:30Z","html_url":"https://github.com/kottans/frontend-2019-homeworks/pull/265#discussion_r245444504","pull_request_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/pulls/265","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/kottans/frontend-2019-homeworks/pulls/comments/245444504"},"html":{"href":"https://github.com/kottans/frontend-2019-homeworks/pull/265#discussion_r245444504"},"pull_request":{"href":"https://api.github.com/repos/kottans/frontend-2019-homeworks/pulls/265"}}},"pull_request":{"url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/pulls/265","id":242257911,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQyMjU3OTEx","html_url":"https://github.com/kottans/frontend-2019-homeworks/pull/265","diff_url":"https://github.com/kottans/frontend-2019-homeworks/pull/265.diff","patch_url":"https://github.com/kottans/frontend-2019-homeworks/pull/265.patch","issue_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/issues/265","number":265,"state":"open","locked":false,"title":"Add js OOP Frogger homework","user":{"login":"Roman-Halenko","id":31565245,"node_id":"MDQ6VXNlcjMxNTY1MjQ1","avatar_url":"https://avatars1.githubusercontent.com/u/31565245?v=4","gravatar_id":"","url":"https://api.github.com/users/Roman-Halenko","html_url":"https://github.com/Roman-Halenko","followers_url":"https://api.github.com/users/Roman-Halenko/followers","following_url":"https://api.github.com/users/Roman-Halenko/following{/other_user}","gists_url":"https://api.github.com/users/Roman-Halenko/gists{/gist_id}","starred_url":"https://api.github.com/users/Roman-Halenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Roman-Halenko/subscriptions","organizations_url":"https://api.github.com/users/Roman-Halenko/orgs","repos_url":"https://api.github.com/users/Roman-Halenko/repos","events_url":"https://api.github.com/users/Roman-Halenko/events{/privacy}","received_events_url":"https://api.github.com/users/Roman-Halenko/received_events","type":"User","site_admin":false},"body":"### JS OOP (Frogger)\r\n\r\n[Demo](https://roman-halenko.github.io/js-oop-frogger/) |\r\n[Code base](https://github.com/Roman-Halenko/js-oop-frogger)\r\n\r\nThe code is submitted in a dedicated feature branch.\r\nPlease, review.\r\n","created_at":"2019-01-04T13:07:11Z","updated_at":"2019-01-04T23:04:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"45ea8df5ab94fd2b6eab7dad13acd0c5cc029683","assignee":{"login":"AMashoshyna","id":17703790,"node_id":"MDQ6VXNlcjE3NzAzNzkw","avatar_url":"https://avatars0.githubusercontent.com/u/17703790?v=4","gravatar_id":"","url":"https://api.github.com/users/AMashoshyna","html_url":"https://github.com/AMashoshyna","followers_url":"https://api.github.com/users/AMashoshyna/followers","following_url":"https://api.github.com/users/AMashoshyna/following{/other_user}","gists_url":"https://api.github.com/users/AMashoshyna/gists{/gist_id}","starred_url":"https://api.github.com/users/AMashoshyna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AMashoshyna/subscriptions","organizations_url":"https://api.github.com/users/AMashoshyna/orgs","repos_url":"https://api.github.com/users/AMashoshyna/repos","events_url":"https://api.github.com/users/AMashoshyna/events{/privacy}","received_events_url":"https://api.github.com/users/AMashoshyna/received_events","type":"User","site_admin":false},"assignees":[{"login":"AMashoshyna","id":17703790,"node_id":"MDQ6VXNlcjE3NzAzNzkw","avatar_url":"https://avatars0.githubusercontent.com/u/17703790?v=4","gravatar_id":"","url":"https://api.github.com/users/AMashoshyna","html_url":"https://github.com/AMashoshyna","followers_url":"https://api.github.com/users/AMashoshyna/followers","following_url":"https://api.github.com/users/AMashoshyna/following{/other_user}","gists_url":"https://api.github.com/users/AMashoshyna/gists{/gist_id}","starred_url":"https://api.github.com/users/AMashoshyna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AMashoshyna/subscriptions","organizations_url":"https://api.github.com/users/AMashoshyna/orgs","repos_url":"https://api.github.com/users/AMashoshyna/repos","events_url":"https://api.github.com/users/AMashoshyna/events{/privacy}","received_events_url":"https://api.github.com/users/AMashoshyna/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1107647614,"node_id":"MDU6TGFiZWwxMTA3NjQ3NjE0","url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/labels/js-oop","name":"js-oop","color":"008672","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/pulls/265/commits","review_comments_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/pulls/265/comments","review_comment_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/issues/265/comments","statuses_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/statuses/c18b386963bbfcc5b311dfd18c00fc8ea0d5524c","head":{"label":"Roman-Halenko:js-oop-frogger","ref":"js-oop-frogger","sha":"c18b386963bbfcc5b311dfd18c00fc8ea0d5524c","user":{"login":"Roman-Halenko","id":31565245,"node_id":"MDQ6VXNlcjMxNTY1MjQ1","avatar_url":"https://avatars1.githubusercontent.com/u/31565245?v=4","gravatar_id":"","url":"https://api.github.com/users/Roman-Halenko","html_url":"https://github.com/Roman-Halenko","followers_url":"https://api.github.com/users/Roman-Halenko/followers","following_url":"https://api.github.com/users/Roman-Halenko/following{/other_user}","gists_url":"https://api.github.com/users/Roman-Halenko/gists{/gist_id}","starred_url":"https://api.github.com/users/Roman-Halenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Roman-Halenko/subscriptions","organizations_url":"https://api.github.com/users/Roman-Halenko/orgs","repos_url":"https://api.github.com/users/Roman-Halenko/repos","events_url":"https://api.github.com/users/Roman-Halenko/events{/privacy}","received_events_url":"https://api.github.com/users/Roman-Halenko/received_events","type":"User","site_admin":false},"repo":{"id":162857266,"node_id":"MDEwOlJlcG9zaXRvcnkxNjI4NTcyNjY=","name":"frontend-2019-homeworks","full_name":"Roman-Halenko/frontend-2019-homeworks","private":false,"owner":{"login":"Roman-Halenko","id":31565245,"node_id":"MDQ6VXNlcjMxNTY1MjQ1","avatar_url":"https://avatars1.githubusercontent.com/u/31565245?v=4","gravatar_id":"","url":"https://api.github.com/users/Roman-Halenko","html_url":"https://github.com/Roman-Halenko","followers_url":"https://api.github.com/users/Roman-Halenko/followers","following_url":"https://api.github.com/users/Roman-Halenko/following{/other_user}","gists_url":"https://api.github.com/users/Roman-Halenko/gists{/gist_id}","starred_url":"https://api.github.com/users/Roman-Halenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Roman-Halenko/subscriptions","organizations_url":"https://api.github.com/users/Roman-Halenko/orgs","repos_url":"https://api.github.com/users/Roman-Halenko/repos","events_url":"https://api.github.com/users/Roman-Halenko/events{/privacy}","received_events_url":"https://api.github.com/users/Roman-Halenko/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Roman-Halenko/frontend-2019-homeworks","description":"Repo for students' homework reviews","fork":true,"url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks","forks_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/forks","keys_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/teams","hooks_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/hooks","issue_events_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/issues/events{/number}","events_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/events","assignees_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/assignees{/user}","branches_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/branches{/branch}","tags_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/tags","blobs_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/git/refs{/sha}","trees_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/statuses/{sha}","languages_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/languages","stargazers_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/stargazers","contributors_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/contributors","subscribers_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/subscribers","subscription_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/subscription","commits_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/commits{/sha}","git_commits_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/git/commits{/sha}","comments_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/comments{/number}","issue_comment_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/issues/comments{/number}","contents_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/contents/{+path}","compare_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/merges","archive_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/downloads","issues_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/issues{/number}","pulls_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/pulls{/number}","milestones_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/milestones{/number}","notifications_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/labels{/name}","releases_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/releases{/id}","deployments_url":"https://api.github.com/repos/Roman-Halenko/frontend-2019-homeworks/deployments","created_at":"2018-12-23T02:46:18Z","updated_at":"2019-01-04T12:51:38Z","pushed_at":"2019-01-04T13:03:47Z","git_url":"git://github.com/Roman-Halenko/frontend-2019-homeworks.git","ssh_url":"git@github.com:Roman-Halenko/frontend-2019-homeworks.git","clone_url":"https://github.com/Roman-Halenko/frontend-2019-homeworks.git","svn_url":"https://github.com/Roman-Halenko/frontend-2019-homeworks","homepage":null,"size":66522,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"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":"kottans:master","ref":"master","sha":"f88018d994a69968dc89f536f75c3cca975e1915","user":{"login":"kottans","id":6013442,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYwMTM0NDI=","avatar_url":"https://avatars1.githubusercontent.com/u/6013442?v=4","gravatar_id":"","url":"https://api.github.com/users/kottans","html_url":"https://github.com/kottans","followers_url":"https://api.github.com/users/kottans/followers","following_url":"https://api.github.com/users/kottans/following{/other_user}","gists_url":"https://api.github.com/users/kottans/gists{/gist_id}","starred_url":"https://api.github.com/users/kottans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kottans/subscriptions","organizations_url":"https://api.github.com/users/kottans/orgs","repos_url":"https://api.github.com/users/kottans/repos","events_url":"https://api.github.com/users/kottans/events{/privacy}","received_events_url":"https://api.github.com/users/kottans/received_events","type":"Organization","site_admin":false},"repo":{"id":155096157,"node_id":"MDEwOlJlcG9zaXRvcnkxNTUwOTYxNTc=","name":"frontend-2019-homeworks","full_name":"kottans/frontend-2019-homeworks","private":false,"owner":{"login":"kottans","id":6013442,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYwMTM0NDI=","avatar_url":"https://avatars1.githubusercontent.com/u/6013442?v=4","gravatar_id":"","url":"https://api.github.com/users/kottans","html_url":"https://github.com/kottans","followers_url":"https://api.github.com/users/kottans/followers","following_url":"https://api.github.com/users/kottans/following{/other_user}","gists_url":"https://api.github.com/users/kottans/gists{/gist_id}","starred_url":"https://api.github.com/users/kottans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kottans/subscriptions","organizations_url":"https://api.github.com/users/kottans/orgs","repos_url":"https://api.github.com/users/kottans/repos","events_url":"https://api.github.com/users/kottans/events{/privacy}","received_events_url":"https://api.github.com/users/kottans/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/kottans/frontend-2019-homeworks","description":"Repo for students' homework reviews","fork":false,"url":"https://api.github.com/repos/kottans/frontend-2019-homeworks","forks_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/forks","keys_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/teams","hooks_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/hooks","issue_events_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/issues/events{/number}","events_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/events","assignees_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/assignees{/user}","branches_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/branches{/branch}","tags_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/tags","blobs_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/git/refs{/sha}","trees_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/statuses/{sha}","languages_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/languages","stargazers_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/stargazers","contributors_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/contributors","subscribers_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/subscribers","subscription_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/subscription","commits_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/commits{/sha}","git_commits_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/git/commits{/sha}","comments_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/comments{/number}","issue_comment_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/issues/comments{/number}","contents_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/contents/{+path}","compare_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/merges","archive_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/downloads","issues_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/issues{/number}","pulls_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/pulls{/number}","milestones_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/milestones{/number}","notifications_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/labels{/name}","releases_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/releases{/id}","deployments_url":"https://api.github.com/repos/kottans/frontend-2019-homeworks/deployments","created_at":"2018-10-28T17:21:19Z","updated_at":"2019-01-04T19:56:33Z","pushed_at":"2019-01-04T22:37:06Z","git_url":"git://github.com/kottans/frontend-2019-homeworks.git","ssh_url":"git@github.com:kottans/frontend-2019-homeworks.git","clone_url":"https://github.com/kottans/frontend-2019-homeworks.git","svn_url":"https://github.com/kottans/frontend-2019-homeworks","homepage":null,"size":67337,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":66,"mirror_url":null,"archived":false,"open_issues_count":32,"license":null,"forks":66,"open_issues":32,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kottans/frontend-2019-homeworks/pulls/265"},"html":{"href":"https://github.com/kottans/frontend-2019-homeworks/pull/265"},"issue":{"href":"https://api.github.com/repos/kottans/frontend-2019-homeworks/issues/265"},"comments":{"href":"https://api.github.com/repos/kottans/frontend-2019-homeworks/issues/265/comments"},"review_comments":{"href":"https://api.github.com/repos/kottans/frontend-2019-homeworks/pulls/265/comments"},"review_comment":{"href":"https://api.github.com/repos/kottans/frontend-2019-homeworks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kottans/frontend-2019-homeworks/pulls/265/commits"},"statuses":{"href":"https://api.github.com/repos/kottans/frontend-2019-homeworks/statuses/c18b386963bbfcc5b311dfd18c00fc8ea0d5524c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"AMashoshyna"}}