{"action":"created","comment":{"url":"https://api.github.com/repos/TeamTetris/tetris-game/pulls/comments/214855238","pull_request_review_id":151988446,"id":214855238,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNDg1NTIzOA==","diff_hunk":"@@ -0,0 +1,108 @@\n+/// <reference path=\"../../../definitions/phaser.d.ts\"/>\n+\n+import Vector2 = Phaser.Math.Vector2;\n+\n+import TextButton from \"tetris/ui/textButton\";\n+import config from \"tetris/config\";\n+import Game from \"tetris/game\";\n+import Brick from \"tetris/brick/brick\";\n+import BrickType from \"tetris/brick/brickType\";\n+import BrickFactory from \"tetris/brick/brickFactory\";\n+import SkinStorage from \"tetris/brick/skinStorage\";\n+import Skin from \"tetris/brick/skin\";\n+import { skinRarityColor } from \"tetris/brick/skinRarity\";\n+\n+export default class CollectionScene extends Phaser.Scene {\n+\n+\t//region public members\n+\t//endregion\n+\n+\t//region public methods\n+\tpublic create(): void {\n+\t\tthis._createBackground();\n+\t\tthis._createButtons();\n+\t}\n+\n+\tpublic update(time: number, delta: number): void {\n+\t\tthis._pipeline.setFloat1('uTime', time / 2600);\n+\t}\n+\t//endregion\n+\n+\t//region constructor\n+\tpublic constructor(game: Game, skinStorage: SkinStorage) {\n+\t\tsuper({\n+\t\t\tkey: \"CollectionScene\"\n+\t\t});\n+\t\tthis._game = game;\n+\t\tthis._skinStorage = skinStorage;\n+\t\tthis._selectedSkins = new Map<BrickType, Skin>();\n+\n+\t\tfor (let brickType = 0; brickType < 7; brickType++) {\n+\t\t\tthis._selectedSkins.set(brickType, skinStorage.getEquippedSkin(brickType));\n+\t\t}\n+\t}\n+\t//endregion\n+\n+\t//region private members\n+\tprivate _background: Phaser.GameObjects.Sprite;\n+\tprivate _skinStorage: SkinStorage;\n+\tprivate readonly _game: Game;\n+\tprivate _selectedSkins: Map<BrickType, Skin>;\n+\tprivate _pipeline: Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline;\n+\t//endregion\n+\n+\t//region private methods\n+\tprivate _createBackground(): void {\n+\t\tconst backgroundGraphics = this.add.graphics();\n+\t\tthis._pipeline = new Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline({\n+\t\t\tgame: this._game,\n+\t\t\trenderer: this._game.renderer, \n+\t\t\tfragShader: this.cache.shader.get('rainbow') \n+\t\t});\n+\t\t(this._game.renderer as Phaser.Renderer.WebGL.WebGLRenderer).addPipeline('rainbow', this._pipeline);\n+\n+\t\tthis._pipeline.setFloat2('uResolution', config.graphics.width, config.graphics.height);\n+\n+\t\tbackgroundGraphics.fillStyle(0xffffff);\n+\t\tbackgroundGraphics.fillRect(0, 0, config.graphics.width, config.graphics.height);\n+\t\tbackgroundGraphics.generateTexture('backgroundGraphics');\n+\t\tthis._background = this.add.sprite(config.graphics.width / 2, config.graphics.height / 2, 'backgroundGraphics');\n+\t\tthis._pipeline.setFloat3('uTint', 0.6, 0.6, 0.3);\n+\n+\t\tthis._background.setPipeline('rainbow');\n+\t}\n+\n+\tprivate _createButtons(): void {\n+\t\tconst menuX1: number = config.graphics.width / 3;\n+\t\tconst menuX2: number = 2 * config.graphics.width / 3;\n+\t\tconst menuY: number = config.graphics.height / 5;\n+\t\tconst spacingX: number = 100;\n+\t\tconst spacingY: number = config.graphics.height / 6;\n+\n+\t\tnew TextButton(this, config.graphics.width / 2, config.graphics.height * 7 / 8, \"green_button00.png\", \"green_button01.png\", \"OK\", function(){ this._game.changeScene(config.sceneKeys.menuScene); }.bind(this));\n+\t\t\n+\t\tconst customBrickOffsets = [new Vector2(-0.5, 0), new Vector2(-1, -1), new Vector2(-1, -0.5), new Vector2(0, -0.5), new Vector2(-1.5, -1), new Vector2(-1.5, -1), new Vector2(-1.5, -1) ];\n+\n+\t\tfor (let i = 0; i < 7; i++) {","path":"src/tetris/scene/collectionScene.ts","position":87,"original_position":86,"commit_id":"4cf3cb25c00eaa83b02bab47e0a66596c91868e1","original_commit_id":"3cecdf9a9f38a5ae1f472db159ec73c65861d1b0","user":{"login":"julianweise","id":9257781,"node_id":"MDQ6VXNlcjkyNTc3ODE=","avatar_url":"https://avatars2.githubusercontent.com/u/9257781?v=4","gravatar_id":"","url":"https://api.github.com/users/julianweise","html_url":"https://github.com/julianweise","followers_url":"https://api.github.com/users/julianweise/followers","following_url":"https://api.github.com/users/julianweise/following{/other_user}","gists_url":"https://api.github.com/users/julianweise/gists{/gist_id}","starred_url":"https://api.github.com/users/julianweise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julianweise/subscriptions","organizations_url":"https://api.github.com/users/julianweise/orgs","repos_url":"https://api.github.com/users/julianweise/repos","events_url":"https://api.github.com/users/julianweise/events{/privacy}","received_events_url":"https://api.github.com/users/julianweise/received_events","type":"User","site_admin":false},"body":"lots of magic numbers in for loop","created_at":"2018-09-04T09:55:51Z","updated_at":"2018-09-04T09:57:40Z","html_url":"https://github.com/TeamTetris/tetris-game/pull/57#discussion_r214855238","pull_request_url":"https://api.github.com/repos/TeamTetris/tetris-game/pulls/57","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/TeamTetris/tetris-game/pulls/comments/214855238"},"html":{"href":"https://github.com/TeamTetris/tetris-game/pull/57#discussion_r214855238"},"pull_request":{"href":"https://api.github.com/repos/TeamTetris/tetris-game/pulls/57"}}},"pull_request":{"url":"https://api.github.com/repos/TeamTetris/tetris-game/pulls/57","id":212911654,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyOTExNjU0","html_url":"https://github.com/TeamTetris/tetris-game/pull/57","diff_url":"https://github.com/TeamTetris/tetris-game/pull/57.diff","patch_url":"https://github.com/TeamTetris/tetris-game/pull/57.patch","issue_url":"https://api.github.com/repos/TeamTetris/tetris-game/issues/57","number":57,"state":"open","locked":false,"title":"Block skins","user":{"login":"msoechting","id":6423697,"node_id":"MDQ6VXNlcjY0MjM2OTc=","avatar_url":"https://avatars1.githubusercontent.com/u/6423697?v=4","gravatar_id":"","url":"https://api.github.com/users/msoechting","html_url":"https://github.com/msoechting","followers_url":"https://api.github.com/users/msoechting/followers","following_url":"https://api.github.com/users/msoechting/following{/other_user}","gists_url":"https://api.github.com/users/msoechting/gists{/gist_id}","starred_url":"https://api.github.com/users/msoechting/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msoechting/subscriptions","organizations_url":"https://api.github.com/users/msoechting/orgs","repos_url":"https://api.github.com/users/msoechting/repos","events_url":"https://api.github.com/users/msoechting/events{/privacy}","received_events_url":"https://api.github.com/users/msoechting/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-09-04T09:30:13Z","updated_at":"2018-09-04T09:57:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1341b4d7d4c35b39d93111ce5393effece2db1af","assignee":null,"assignees":[],"requested_reviewers":[{"login":"friedow","id":17351844,"node_id":"MDQ6VXNlcjE3MzUxODQ0","avatar_url":"https://avatars3.githubusercontent.com/u/17351844?v=4","gravatar_id":"","url":"https://api.github.com/users/friedow","html_url":"https://github.com/friedow","followers_url":"https://api.github.com/users/friedow/followers","following_url":"https://api.github.com/users/friedow/following{/other_user}","gists_url":"https://api.github.com/users/friedow/gists{/gist_id}","starred_url":"https://api.github.com/users/friedow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/friedow/subscriptions","organizations_url":"https://api.github.com/users/friedow/orgs","repos_url":"https://api.github.com/users/friedow/repos","events_url":"https://api.github.com/users/friedow/events{/privacy}","received_events_url":"https://api.github.com/users/friedow/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/TeamTetris/tetris-game/pulls/57/commits","review_comments_url":"https://api.github.com/repos/TeamTetris/tetris-game/pulls/57/comments","review_comment_url":"https://api.github.com/repos/TeamTetris/tetris-game/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TeamTetris/tetris-game/issues/57/comments","statuses_url":"https://api.github.com/repos/TeamTetris/tetris-game/statuses/4cf3cb25c00eaa83b02bab47e0a66596c91868e1","head":{"label":"TeamTetris:feature/block-skins-3","ref":"feature/block-skins-3","sha":"4cf3cb25c00eaa83b02bab47e0a66596c91868e1","user":{"login":"TeamTetris","id":39217329,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MjE3MzI5","avatar_url":"https://avatars1.githubusercontent.com/u/39217329?v=4","gravatar_id":"","url":"https://api.github.com/users/TeamTetris","html_url":"https://github.com/TeamTetris","followers_url":"https://api.github.com/users/TeamTetris/followers","following_url":"https://api.github.com/users/TeamTetris/following{/other_user}","gists_url":"https://api.github.com/users/TeamTetris/gists{/gist_id}","starred_url":"https://api.github.com/users/TeamTetris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeamTetris/subscriptions","organizations_url":"https://api.github.com/users/TeamTetris/orgs","repos_url":"https://api.github.com/users/TeamTetris/repos","events_url":"https://api.github.com/users/TeamTetris/events{/privacy}","received_events_url":"https://api.github.com/users/TeamTetris/received_events","type":"Organization","site_admin":false},"repo":{"id":133808456,"node_id":"MDEwOlJlcG9zaXRvcnkxMzM4MDg0NTY=","name":"tetris-game","full_name":"TeamTetris/tetris-game","owner":{"login":"TeamTetris","id":39217329,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MjE3MzI5","avatar_url":"https://avatars1.githubusercontent.com/u/39217329?v=4","gravatar_id":"","url":"https://api.github.com/users/TeamTetris","html_url":"https://github.com/TeamTetris","followers_url":"https://api.github.com/users/TeamTetris/followers","following_url":"https://api.github.com/users/TeamTetris/following{/other_user}","gists_url":"https://api.github.com/users/TeamTetris/gists{/gist_id}","starred_url":"https://api.github.com/users/TeamTetris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeamTetris/subscriptions","organizations_url":"https://api.github.com/users/TeamTetris/orgs","repos_url":"https://api.github.com/users/TeamTetris/repos","events_url":"https://api.github.com/users/TeamTetris/events{/privacy}","received_events_url":"https://api.github.com/users/TeamTetris/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TeamTetris/tetris-game","description":null,"fork":false,"url":"https://api.github.com/repos/TeamTetris/tetris-game","forks_url":"https://api.github.com/repos/TeamTetris/tetris-game/forks","keys_url":"https://api.github.com/repos/TeamTetris/tetris-game/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TeamTetris/tetris-game/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TeamTetris/tetris-game/teams","hooks_url":"https://api.github.com/repos/TeamTetris/tetris-game/hooks","issue_events_url":"https://api.github.com/repos/TeamTetris/tetris-game/issues/events{/number}","events_url":"https://api.github.com/repos/TeamTetris/tetris-game/events","assignees_url":"https://api.github.com/repos/TeamTetris/tetris-game/assignees{/user}","branches_url":"https://api.github.com/repos/TeamTetris/tetris-game/branches{/branch}","tags_url":"https://api.github.com/repos/TeamTetris/tetris-game/tags","blobs_url":"https://api.github.com/repos/TeamTetris/tetris-game/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TeamTetris/tetris-game/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TeamTetris/tetris-game/git/refs{/sha}","trees_url":"https://api.github.com/repos/TeamTetris/tetris-game/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TeamTetris/tetris-game/statuses/{sha}","languages_url":"https://api.github.com/repos/TeamTetris/tetris-game/languages","stargazers_url":"https://api.github.com/repos/TeamTetris/tetris-game/stargazers","contributors_url":"https://api.github.com/repos/TeamTetris/tetris-game/contributors","subscribers_url":"https://api.github.com/repos/TeamTetris/tetris-game/subscribers","subscription_url":"https://api.github.com/repos/TeamTetris/tetris-game/subscription","commits_url":"https://api.github.com/repos/TeamTetris/tetris-game/commits{/sha}","git_commits_url":"https://api.github.com/repos/TeamTetris/tetris-game/git/commits{/sha}","comments_url":"https://api.github.com/repos/TeamTetris/tetris-game/comments{/number}","issue_comment_url":"https://api.github.com/repos/TeamTetris/tetris-game/issues/comments{/number}","contents_url":"https://api.github.com/repos/TeamTetris/tetris-game/contents/{+path}","compare_url":"https://api.github.com/repos/TeamTetris/tetris-game/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TeamTetris/tetris-game/merges","archive_url":"https://api.github.com/repos/TeamTetris/tetris-game/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TeamTetris/tetris-game/downloads","issues_url":"https://api.github.com/repos/TeamTetris/tetris-game/issues{/number}","pulls_url":"https://api.github.com/repos/TeamTetris/tetris-game/pulls{/number}","milestones_url":"https://api.github.com/repos/TeamTetris/tetris-game/milestones{/number}","notifications_url":"https://api.github.com/repos/TeamTetris/tetris-game/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TeamTetris/tetris-game/labels{/name}","releases_url":"https://api.github.com/repos/TeamTetris/tetris-game/releases{/id}","deployments_url":"https://api.github.com/repos/TeamTetris/tetris-game/deployments","created_at":"2018-05-17T12:12:47Z","updated_at":"2018-09-04T09:35:24Z","pushed_at":"2018-09-04T09:48:51Z","git_url":"git://github.com/TeamTetris/tetris-game.git","ssh_url":"git@github.com:TeamTetris/tetris-game.git","clone_url":"https://github.com/TeamTetris/tetris-game.git","svn_url":"https://github.com/TeamTetris/tetris-game","homepage":null,"size":1100,"stargazers_count":2,"watchers_count":2,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":15,"license":null,"forks":0,"open_issues":15,"watchers":2,"default_branch":"developer"}},"base":{"label":"TeamTetris:developer","ref":"developer","sha":"fcc7f5d209b1191b10156947305e754f33266cd2","user":{"login":"TeamTetris","id":39217329,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MjE3MzI5","avatar_url":"https://avatars1.githubusercontent.com/u/39217329?v=4","gravatar_id":"","url":"https://api.github.com/users/TeamTetris","html_url":"https://github.com/TeamTetris","followers_url":"https://api.github.com/users/TeamTetris/followers","following_url":"https://api.github.com/users/TeamTetris/following{/other_user}","gists_url":"https://api.github.com/users/TeamTetris/gists{/gist_id}","starred_url":"https://api.github.com/users/TeamTetris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeamTetris/subscriptions","organizations_url":"https://api.github.com/users/TeamTetris/orgs","repos_url":"https://api.github.com/users/TeamTetris/repos","events_url":"https://api.github.com/users/TeamTetris/events{/privacy}","received_events_url":"https://api.github.com/users/TeamTetris/received_events","type":"Organization","site_admin":false},"repo":{"id":133808456,"node_id":"MDEwOlJlcG9zaXRvcnkxMzM4MDg0NTY=","name":"tetris-game","full_name":"TeamTetris/tetris-game","owner":{"login":"TeamTetris","id":39217329,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MjE3MzI5","avatar_url":"https://avatars1.githubusercontent.com/u/39217329?v=4","gravatar_id":"","url":"https://api.github.com/users/TeamTetris","html_url":"https://github.com/TeamTetris","followers_url":"https://api.github.com/users/TeamTetris/followers","following_url":"https://api.github.com/users/TeamTetris/following{/other_user}","gists_url":"https://api.github.com/users/TeamTetris/gists{/gist_id}","starred_url":"https://api.github.com/users/TeamTetris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeamTetris/subscriptions","organizations_url":"https://api.github.com/users/TeamTetris/orgs","repos_url":"https://api.github.com/users/TeamTetris/repos","events_url":"https://api.github.com/users/TeamTetris/events{/privacy}","received_events_url":"https://api.github.com/users/TeamTetris/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TeamTetris/tetris-game","description":null,"fork":false,"url":"https://api.github.com/repos/TeamTetris/tetris-game","forks_url":"https://api.github.com/repos/TeamTetris/tetris-game/forks","keys_url":"https://api.github.com/repos/TeamTetris/tetris-game/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TeamTetris/tetris-game/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TeamTetris/tetris-game/teams","hooks_url":"https://api.github.com/repos/TeamTetris/tetris-game/hooks","issue_events_url":"https://api.github.com/repos/TeamTetris/tetris-game/issues/events{/number}","events_url":"https://api.github.com/repos/TeamTetris/tetris-game/events","assignees_url":"https://api.github.com/repos/TeamTetris/tetris-game/assignees{/user}","branches_url":"https://api.github.com/repos/TeamTetris/tetris-game/branches{/branch}","tags_url":"https://api.github.com/repos/TeamTetris/tetris-game/tags","blobs_url":"https://api.github.com/repos/TeamTetris/tetris-game/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TeamTetris/tetris-game/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TeamTetris/tetris-game/git/refs{/sha}","trees_url":"https://api.github.com/repos/TeamTetris/tetris-game/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TeamTetris/tetris-game/statuses/{sha}","languages_url":"https://api.github.com/repos/TeamTetris/tetris-game/languages","stargazers_url":"https://api.github.com/repos/TeamTetris/tetris-game/stargazers","contributors_url":"https://api.github.com/repos/TeamTetris/tetris-game/contributors","subscribers_url":"https://api.github.com/repos/TeamTetris/tetris-game/subscribers","subscription_url":"https://api.github.com/repos/TeamTetris/tetris-game/subscription","commits_url":"https://api.github.com/repos/TeamTetris/tetris-game/commits{/sha}","git_commits_url":"https://api.github.com/repos/TeamTetris/tetris-game/git/commits{/sha}","comments_url":"https://api.github.com/repos/TeamTetris/tetris-game/comments{/number}","issue_comment_url":"https://api.github.com/repos/TeamTetris/tetris-game/issues/comments{/number}","contents_url":"https://api.github.com/repos/TeamTetris/tetris-game/contents/{+path}","compare_url":"https://api.github.com/repos/TeamTetris/tetris-game/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TeamTetris/tetris-game/merges","archive_url":"https://api.github.com/repos/TeamTetris/tetris-game/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TeamTetris/tetris-game/downloads","issues_url":"https://api.github.com/repos/TeamTetris/tetris-game/issues{/number}","pulls_url":"https://api.github.com/repos/TeamTetris/tetris-game/pulls{/number}","milestones_url":"https://api.github.com/repos/TeamTetris/tetris-game/milestones{/number}","notifications_url":"https://api.github.com/repos/TeamTetris/tetris-game/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TeamTetris/tetris-game/labels{/name}","releases_url":"https://api.github.com/repos/TeamTetris/tetris-game/releases{/id}","deployments_url":"https://api.github.com/repos/TeamTetris/tetris-game/deployments","created_at":"2018-05-17T12:12:47Z","updated_at":"2018-09-04T09:35:24Z","pushed_at":"2018-09-04T09:48:51Z","git_url":"git://github.com/TeamTetris/tetris-game.git","ssh_url":"git@github.com:TeamTetris/tetris-game.git","clone_url":"https://github.com/TeamTetris/tetris-game.git","svn_url":"https://github.com/TeamTetris/tetris-game","homepage":null,"size":1100,"stargazers_count":2,"watchers_count":2,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":15,"license":null,"forks":0,"open_issues":15,"watchers":2,"default_branch":"developer"}},"_links":{"self":{"href":"https://api.github.com/repos/TeamTetris/tetris-game/pulls/57"},"html":{"href":"https://github.com/TeamTetris/tetris-game/pull/57"},"issue":{"href":"https://api.github.com/repos/TeamTetris/tetris-game/issues/57"},"comments":{"href":"https://api.github.com/repos/TeamTetris/tetris-game/issues/57/comments"},"review_comments":{"href":"https://api.github.com/repos/TeamTetris/tetris-game/pulls/57/comments"},"review_comment":{"href":"https://api.github.com/repos/TeamTetris/tetris-game/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TeamTetris/tetris-game/pulls/57/commits"},"statuses":{"href":"https://api.github.com/repos/TeamTetris/tetris-game/statuses/4cf3cb25c00eaa83b02bab47e0a66596c91868e1"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"julianweise"}}