{"action":"created","comment":{"url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/pulls/comments/305110352","pull_request_review_id":263901803,"id":305110352,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMwNTExMDM1Mg==","diff_hunk":"@@ -267,28 +267,42 @@ class GameArea{\n             if (x < 0 || y < 0 || x >= this.width || y >= this.height) return; // проверка на выход из карты\n             let lastBlock = this.map[x][y][layout];\n             this.map[x][y][layout] = this.makeAirBlock();\n-            this.deleteLightRound(x, y, x, y, items[lastBlock].brightness, items[lastBlock].isNaturalLight === true);\n+            if(layout === GameArea.MAIN_LAYOUT) {\n+                this.deleteLightRound(x, y, x, y, items[lastBlock].brightness, items[lastBlock].isNaturalLight === true);\n+            }\n             this.addLightRound(x, y, x, y, 9, true, false);\n             this.updateRadius(x, y, layout);\n         };\n \n-        // Можно ставить блок на (x, y, MAIN_LAYOUT)\n-        this.canPlace = (x, y) => {\n-            let startX = Math.floor(player.x - Player.WIDTH / 2);\n-            let endX = Math.floor(player.x + Player.WIDTH / 2);\n-            let startY = Math.floor(player.y);\n-            let endY = Math.floor(player.y + Player.HEIGHT);\n-            return x >= 0 && y >= 0 && x < this.width && y < this.height // Пределы мира\n-            && !(x >= startX && x <= endX && y >= startY && y <= endY) // Площадь игрока\n-            && (this.map[x][y][GameArea.MAIN_LAYOUT] == undefined\n-                || this.map[x][y][GameArea.MAIN_LAYOUT].type == \"water\");\n+        // Можно ставить блок на (x, y, layout)\n+        this.canPlace = (x, y, layout) => {\n+            if(layout === GameArea.MAIN_LAYOUT) {\n+                let startX = Math.floor(player.x - Player.WIDTH / 2);\n+                let endX = Math.floor(player.x + Player.WIDTH / 2);\n+                let startY = Math.floor(player.y);\n+                let endY = Math.floor(player.y + Player.HEIGHT);","path":"Scripts/gameArea.js","position":471,"original_position":28,"commit_id":"6f32b925ca097267532ac1bf7e2884f64d2affba","original_commit_id":"6eddb818dd804fb648e8ed5fd182936deef16563","user":{"login":"Mazdaywik","id":1309859,"node_id":"MDQ6VXNlcjEzMDk4NTk=","avatar_url":"https://avatars2.githubusercontent.com/u/1309859?v=4","gravatar_id":"","url":"https://api.github.com/users/Mazdaywik","html_url":"https://github.com/Mazdaywik","followers_url":"https://api.github.com/users/Mazdaywik/followers","following_url":"https://api.github.com/users/Mazdaywik/following{/other_user}","gists_url":"https://api.github.com/users/Mazdaywik/gists{/gist_id}","starred_url":"https://api.github.com/users/Mazdaywik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mazdaywik/subscriptions","organizations_url":"https://api.github.com/users/Mazdaywik/orgs","repos_url":"https://api.github.com/users/Mazdaywik/repos","events_url":"https://api.github.com/users/Mazdaywik/events{/privacy}","received_events_url":"https://api.github.com/users/Mazdaywik/received_events","type":"User","site_admin":false},"body":"Хороший стиль, который пропагандировал @alex-qrcs, писать `const` вместо `let` везде, где только можно. Здесь, например, лучше написать 4 `const`’а.","created_at":"2019-07-18T20:53:44Z","updated_at":"2019-07-18T20:53:44Z","html_url":"https://github.com/bmstu-iu9/utp2019-2-2d-game/pull/89#discussion_r305110352","pull_request_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/pulls/89","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/pulls/comments/305110352"},"html":{"href":"https://github.com/bmstu-iu9/utp2019-2-2d-game/pull/89#discussion_r305110352"},"pull_request":{"href":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/pulls/89"}}},"pull_request":{"url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/pulls/89","id":298859336,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjk4ODU5MzM2","html_url":"https://github.com/bmstu-iu9/utp2019-2-2d-game/pull/89","diff_url":"https://github.com/bmstu-iu9/utp2019-2-2d-game/pull/89.diff","patch_url":"https://github.com/bmstu-iu9/utp2019-2-2d-game/pull/89.patch","issue_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/issues/89","number":89,"state":"open","locked":false,"title":"Develop","user":{"login":"Shaniser","id":48556605,"node_id":"MDQ6VXNlcjQ4NTU2NjA1","avatar_url":"https://avatars0.githubusercontent.com/u/48556605?v=4","gravatar_id":"","url":"https://api.github.com/users/Shaniser","html_url":"https://github.com/Shaniser","followers_url":"https://api.github.com/users/Shaniser/followers","following_url":"https://api.github.com/users/Shaniser/following{/other_user}","gists_url":"https://api.github.com/users/Shaniser/gists{/gist_id}","starred_url":"https://api.github.com/users/Shaniser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shaniser/subscriptions","organizations_url":"https://api.github.com/users/Shaniser/orgs","repos_url":"https://api.github.com/users/Shaniser/repos","events_url":"https://api.github.com/users/Shaniser/events{/privacy}","received_events_url":"https://api.github.com/users/Shaniser/received_events","type":"User","site_admin":false},"body":"Может уже в мастер?","created_at":"2019-07-18T10:54:18Z","updated_at":"2019-07-18T20:53:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd88ad47e6c7573cb0232605398d9746e79409fd","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/pulls/89/commits","review_comments_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/pulls/89/comments","review_comment_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/issues/89/comments","statuses_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/statuses/6f32b925ca097267532ac1bf7e2884f64d2affba","head":{"label":"bmstu-iu9:develop","ref":"develop","sha":"6f32b925ca097267532ac1bf7e2884f64d2affba","user":{"login":"bmstu-iu9","id":20711587,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNzExNTg3","avatar_url":"https://avatars1.githubusercontent.com/u/20711587?v=4","gravatar_id":"","url":"https://api.github.com/users/bmstu-iu9","html_url":"https://github.com/bmstu-iu9","followers_url":"https://api.github.com/users/bmstu-iu9/followers","following_url":"https://api.github.com/users/bmstu-iu9/following{/other_user}","gists_url":"https://api.github.com/users/bmstu-iu9/gists{/gist_id}","starred_url":"https://api.github.com/users/bmstu-iu9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmstu-iu9/subscriptions","organizations_url":"https://api.github.com/users/bmstu-iu9/orgs","repos_url":"https://api.github.com/users/bmstu-iu9/repos","events_url":"https://api.github.com/users/bmstu-iu9/events{/privacy}","received_events_url":"https://api.github.com/users/bmstu-iu9/received_events","type":"Organization","site_admin":false},"repo":{"id":194884487,"node_id":"MDEwOlJlcG9zaXRvcnkxOTQ4ODQ0ODc=","name":"utp2019-2-2d-game","full_name":"bmstu-iu9/utp2019-2-2d-game","private":false,"owner":{"login":"bmstu-iu9","id":20711587,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNzExNTg3","avatar_url":"https://avatars1.githubusercontent.com/u/20711587?v=4","gravatar_id":"","url":"https://api.github.com/users/bmstu-iu9","html_url":"https://github.com/bmstu-iu9","followers_url":"https://api.github.com/users/bmstu-iu9/followers","following_url":"https://api.github.com/users/bmstu-iu9/following{/other_user}","gists_url":"https://api.github.com/users/bmstu-iu9/gists{/gist_id}","starred_url":"https://api.github.com/users/bmstu-iu9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmstu-iu9/subscriptions","organizations_url":"https://api.github.com/users/bmstu-iu9/orgs","repos_url":"https://api.github.com/users/bmstu-iu9/repos","events_url":"https://api.github.com/users/bmstu-iu9/events{/privacy}","received_events_url":"https://api.github.com/users/bmstu-iu9/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/bmstu-iu9/utp2019-2-2d-game","description":"2D-игра, команда Алексея Костюченко","fork":false,"url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game","forks_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/forks","keys_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/teams","hooks_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/hooks","issue_events_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/issues/events{/number}","events_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/events","assignees_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/assignees{/user}","branches_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/branches{/branch}","tags_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/tags","blobs_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/git/refs{/sha}","trees_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/statuses/{sha}","languages_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/languages","stargazers_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/stargazers","contributors_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/contributors","subscribers_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/subscribers","subscription_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/subscription","commits_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/commits{/sha}","git_commits_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/git/commits{/sha}","comments_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/comments{/number}","issue_comment_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/issues/comments{/number}","contents_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/contents/{+path}","compare_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/merges","archive_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/downloads","issues_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/issues{/number}","pulls_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/pulls{/number}","milestones_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/milestones{/number}","notifications_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/labels{/name}","releases_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/releases{/id}","deployments_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/deployments","created_at":"2019-07-02T14:55:30Z","updated_at":"2019-07-18T14:18:29Z","pushed_at":"2019-07-18T17:49:20Z","git_url":"git://github.com/bmstu-iu9/utp2019-2-2d-game.git","ssh_url":"git@github.com:bmstu-iu9/utp2019-2-2d-game.git","clone_url":"https://github.com/bmstu-iu9/utp2019-2-2d-game.git","svn_url":"https://github.com/bmstu-iu9/utp2019-2-2d-game","homepage":"https://bmstu-iu9.github.io/utp2019-2-2d-game/","size":9252,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":23,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":5,"open_issues":23,"watchers":2,"default_branch":"master"}},"base":{"label":"bmstu-iu9:master","ref":"master","sha":"c3b1d568317b148254daf4316b7ada1760cc1095","user":{"login":"bmstu-iu9","id":20711587,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNzExNTg3","avatar_url":"https://avatars1.githubusercontent.com/u/20711587?v=4","gravatar_id":"","url":"https://api.github.com/users/bmstu-iu9","html_url":"https://github.com/bmstu-iu9","followers_url":"https://api.github.com/users/bmstu-iu9/followers","following_url":"https://api.github.com/users/bmstu-iu9/following{/other_user}","gists_url":"https://api.github.com/users/bmstu-iu9/gists{/gist_id}","starred_url":"https://api.github.com/users/bmstu-iu9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmstu-iu9/subscriptions","organizations_url":"https://api.github.com/users/bmstu-iu9/orgs","repos_url":"https://api.github.com/users/bmstu-iu9/repos","events_url":"https://api.github.com/users/bmstu-iu9/events{/privacy}","received_events_url":"https://api.github.com/users/bmstu-iu9/received_events","type":"Organization","site_admin":false},"repo":{"id":194884487,"node_id":"MDEwOlJlcG9zaXRvcnkxOTQ4ODQ0ODc=","name":"utp2019-2-2d-game","full_name":"bmstu-iu9/utp2019-2-2d-game","private":false,"owner":{"login":"bmstu-iu9","id":20711587,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNzExNTg3","avatar_url":"https://avatars1.githubusercontent.com/u/20711587?v=4","gravatar_id":"","url":"https://api.github.com/users/bmstu-iu9","html_url":"https://github.com/bmstu-iu9","followers_url":"https://api.github.com/users/bmstu-iu9/followers","following_url":"https://api.github.com/users/bmstu-iu9/following{/other_user}","gists_url":"https://api.github.com/users/bmstu-iu9/gists{/gist_id}","starred_url":"https://api.github.com/users/bmstu-iu9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmstu-iu9/subscriptions","organizations_url":"https://api.github.com/users/bmstu-iu9/orgs","repos_url":"https://api.github.com/users/bmstu-iu9/repos","events_url":"https://api.github.com/users/bmstu-iu9/events{/privacy}","received_events_url":"https://api.github.com/users/bmstu-iu9/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/bmstu-iu9/utp2019-2-2d-game","description":"2D-игра, команда Алексея Костюченко","fork":false,"url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game","forks_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/forks","keys_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/teams","hooks_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/hooks","issue_events_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/issues/events{/number}","events_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/events","assignees_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/assignees{/user}","branches_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/branches{/branch}","tags_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/tags","blobs_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/git/refs{/sha}","trees_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/statuses/{sha}","languages_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/languages","stargazers_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/stargazers","contributors_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/contributors","subscribers_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/subscribers","subscription_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/subscription","commits_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/commits{/sha}","git_commits_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/git/commits{/sha}","comments_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/comments{/number}","issue_comment_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/issues/comments{/number}","contents_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/contents/{+path}","compare_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/merges","archive_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/downloads","issues_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/issues{/number}","pulls_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/pulls{/number}","milestones_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/milestones{/number}","notifications_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/labels{/name}","releases_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/releases{/id}","deployments_url":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/deployments","created_at":"2019-07-02T14:55:30Z","updated_at":"2019-07-18T14:18:29Z","pushed_at":"2019-07-18T17:49:20Z","git_url":"git://github.com/bmstu-iu9/utp2019-2-2d-game.git","ssh_url":"git@github.com:bmstu-iu9/utp2019-2-2d-game.git","clone_url":"https://github.com/bmstu-iu9/utp2019-2-2d-game.git","svn_url":"https://github.com/bmstu-iu9/utp2019-2-2d-game","homepage":"https://bmstu-iu9.github.io/utp2019-2-2d-game/","size":9252,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":23,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":5,"open_issues":23,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/pulls/89"},"html":{"href":"https://github.com/bmstu-iu9/utp2019-2-2d-game/pull/89"},"issue":{"href":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/issues/89"},"comments":{"href":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/issues/89/comments"},"review_comments":{"href":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/pulls/89/comments"},"review_comment":{"href":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/pulls/89/commits"},"statuses":{"href":"https://api.github.com/repos/bmstu-iu9/utp2019-2-2d-game/statuses/6f32b925ca097267532ac1bf7e2884f64d2affba"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Mazdaywik"}}