{"action":"created","comment":{"url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/pulls/comments/237487730","pull_request_review_id":179796312,"id":237487730,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNzQ4NzczMA==","diff_hunk":"@@ -0,0 +1,856 @@\n+/*\n+  spaceinvaders.js\n+\n+  the core logic for the space invaders game.\n+\n+*/\n+\n+/*\n+    Game Class\n+\n+    The Game class represents a Space Invaders game.\n+    Create an instance of it, change any of the default values\n+    in the settings, and call 'start' to run the game.\n+\n+    Call 'initialise' before 'start' to set the canvas the game\n+    will draw to.\n+\n+    Call 'moveShip' or 'shipFire' to control the ship.\n+\n+    Listen for 'gameWon' or 'gameLost' events to handle the game\n+    ending.\n+*/\n+\n+//  Constants for the keyboard.\n+var KEY_LEFT = 37;\n+var KEY_RIGHT = 39;\n+var KEY_SPACE = 32;\n+\n+//  Creates an instance of the Game class.\n+function Game() {\n+\n+    //  Set the initial config.\n+    this.config = {\n+        bombRate: 0.05,\n+        bombMinVelocity: 50,\n+        bombMaxVelocity: 50,\n+        invaderInitialVelocity: 25,\n+        invaderAcceleration: 0,\n+        invaderDropDistance: 20,\n+        rocketVelocity: 120,\n+        rocketMaxFireRate: 2,\n+        gameWidth: 400,\n+        gameHeight: 300,\n+        fps: 50,\n+        debugMode: false,\n+        invaderRanks: 5,\n+        invaderFiles: 10,\n+        shipSpeed: 120,\n+        levelDifficultyMultiplier: 0.2,\n+        pointsPerInvader: 5,\n+        limitLevelIncrease: 25\n+    };\n+\n+    //  All state is in the variables below.\n+    this.lives = 3;\n+    this.width = 0;\n+    this.height = 0;\n+    this.gameBounds = {left: 0, top: 0, right: 0, bottom: 0};\n+    this.intervalId = 0;\n+    this.score = 0;\n+    this.level = 1;\n+\n+    //  The state stack.\n+    this.stateStack = [];\n+\n+    //  Input/output\n+    this.pressedKeys = {};\n+    this.gameCanvas =  null;\n+\n+    //  All sounds.\n+    this.sounds = null;\n+\n+    //  The previous x position, used for touch.\n+    this.previousX = 0;\n+}\n+\n+//  Initialis the Game with a canvas.\n+Game.prototype.initialise = function(gameCanvas) {\n+\n+    //  Set the game canvas.\n+    this.gameCanvas = gameCanvas;\n+\n+    //  Set the game width and height.\n+    this.width = gameCanvas.width;\n+    this.height = gameCanvas.height;\n+\n+    //  Set the state game bounds.\n+    this.gameBounds = {\n+        left: gameCanvas.width / 2 - this.config.gameWidth / 2,\n+        right: gameCanvas.width / 2 + this.config.gameWidth / 2,\n+        top: gameCanvas.height / 2 - this.config.gameHeight / 2,\n+        bottom: gameCanvas.height / 2 + this.config.gameHeight / 2,\n+    };\n+};\n+\n+Game.prototype.moveToState = function(state) {\n+\n+    //  If we are in a state, leave it.\n+    if(this.currentState() && this.currentState().leave) {\n+        this.currentState().leave(game);\n+        this.stateStack.pop();\n+    }\n+\n+    //  If there's an enter function for the new state, call it.\n+    if(state.enter) {\n+        state.enter(game);\n+    }\n+\n+    //  Set the current state.\n+    this.stateStack.pop();\n+    this.stateStack.push(state);\n+};\n+\n+//  Start the Game.\n+Game.prototype.start = function() {\n+\n+    //  Move into the 'welcome' state.\n+    this.moveToState(new WelcomeState());\n+\n+    //  Set the game variables.\n+    this.lives = 3;\n+    this.config.debugMode = /debug=true/.test(window.location.href);\n+\n+    //  Start the game loop.\n+    var game = this;\n+    this.intervalId = setInterval(function () { GameLoop(game);}, 1000 / this.config.fps);\n+\n+};\n+\n+//  Returns the current state.\n+Game.prototype.currentState = function() {\n+    return this.stateStack.length > 0 ? this.stateStack[this.stateStack.length - 1] : null;\n+};\n+\n+//  Mutes or unmutes the game.\n+Game.prototype.mute = function(mute) {\n+\n+    //  If we've been told to mute, mute.\n+    if(mute === true) {\n+        this.sounds.mute = true;\n+    } else if (mute === false) {\n+        this.sounds.mute = false;\n+    } else {\n+        // Toggle mute instead...\n+        this.sounds.mute = this.sounds.mute ? false : true;\n+    }\n+};\n+\n+//  The main loop.\n+function GameLoop(game) {\n+    var currentState = game.currentState();\n+    if(currentState) {\n+\n+        //  Delta t is the time to update/draw.\n+        var dt = 1 / game.config.fps;\n+\n+        //  Get the drawing context.\n+        var ctx = this.gameCanvas.getContext(\"2d\");\n+\n+        //  Update if we have an update function. Also draw\n+        //  if we have a draw function.\n+        if(currentState.update) {\n+            currentState.update(game, dt);\n+        }\n+        if(currentState.draw) {\n+            currentState.draw(game, dt, ctx);\n+        }\n+    }\n+}\n+\n+Game.prototype.pushState = function(state) {\n+\n+    //  If there's an enter function for the new state, call it.\n+    if(state.enter) {\n+        state.enter(game);\n+    }\n+    //  Set the current state.\n+    this.stateStack.push(state);\n+};\n+\n+Game.prototype.popState = function() {\n+\n+    //  Leave and pop the state.\n+    if(this.currentState()) {\n+        if(this.currentState().leave) {\n+            this.currentState().leave(game);\n+        }\n+\n+        //  Set the current state.\n+        this.stateStack.pop();\n+    }\n+};\n+\n+//  The stop function stops the game.\n+Game.prototype.stop = function Stop() {\n+    clearInterval(this.intervalId);\n+};\n+\n+//  Inform the game a key is down.\n+Game.prototype.keyDown = function(keyCode) {\n+    this.pressedKeys[keyCode] = true;\n+    //  Delegate to the current state too.\n+    if(this.currentState() && this.currentState().keyDown) {\n+        this.currentState().keyDown(this, keyCode);\n+    }\n+};\n+\n+Game.prototype.touchstart = function(s) {\n+    if(this.currentState() && this.currentState().keyDown) {\n+        this.currentState().keyDown(this, KEY_SPACE);\n+    }\n+};\n+\n+Game.prototype.touchend = function(s) {\n+    delete this.pressedKeys[KEY_RIGHT];\n+    delete this.pressedKeys[KEY_LEFT];\n+};\n+\n+Game.prototype.touchmove = function(e) {\n+    var currentX = e.changedTouches[0].pageX;\n+    if (this.previousX > 0) {\n+        if (currentX > this.previousX) {\n+            delete this.pressedKeys[KEY_LEFT];\n+            this.pressedKeys[KEY_RIGHT] = true;\n+        } else {\n+            delete this.pressedKeys[KEY_RIGHT];\n+            this.pressedKeys[KEY_LEFT] = true;\n+        }\n+    }\n+    this.previousX = currentX;\n+};\n+\n+//  Inform the game a key is up.\n+Game.prototype.keyUp = function(keyCode) {\n+    delete this.pressedKeys[keyCode];\n+    //  Delegate to the current state too.\n+    if(this.currentState() && this.currentState().keyUp) {\n+        this.currentState().keyUp(this, keyCode);\n+    }\n+};\n+\n+function WelcomeState() {\n+\n+}\n+\n+WelcomeState.prototype.enter = function(game) {\n+\n+    // Create and load the sounds.\n+    game.sounds = new Sounds();\n+    game.sounds.init();\n+    game.sounds.loadSound('shoot', 'assets/sounds/shoot.wav');\n+    game.sounds.loadSound('bang', 'assets/sounds/bang.wav');\n+    game.sounds.loadSound('explosion', 'assets/sounds/explosion.wav');\n+};\n+\n+WelcomeState.prototype.update = function (game, dt) {\n+\n+\n+};\n+\n+WelcomeState.prototype.draw = function(game, dt, ctx) {\n+\n+    //  Clear the background.\n+    ctx.clearRect(0, 0, game.width, game.height);\n+\n+    ctx.font=\"30px Arial\";\n+    ctx.fillStyle = '#ffffff';\n+    ctx.textBaseline=\"center\";\n+    ctx.textAlign=\"center\";\n+    ctx.fillText(\"Space Invaders\", game.width / 2, game.height/2 - 40);\n+    ctx.font=\"16px Arial\";\n+\n+    ctx.fillText(\"Press 'Space' or touch to start.\", game.width / 2, game.height/2);\n+};\n+\n+WelcomeState.prototype.keyDown = function(game, keyCode) {\n+    if(keyCode == KEY_SPACE) {\n+        //  Space starts the game.\n+        game.level = 1;\n+        game.score = 0;\n+        game.lives = 3;\n+        game.moveToState(new LevelIntroState(game.level));\n+    }\n+};\n+\n+function GameOverState() {\n+\n+}\n+\n+GameOverState.prototype.update = function(game, dt) {\n+\n+};\n+\n+GameOverState.prototype.draw = function(game, dt, ctx) {\n+\n+    //  Clear the background.\n+    ctx.clearRect(0, 0, game.width, game.height);\n+\n+    ctx.font=\"30px Arial\";\n+    ctx.fillStyle = '#ffffff';\n+    ctx.textBaseline=\"center\";\n+    ctx.textAlign=\"center\";\n+    ctx.fillText(\"Game Over!\", game.width / 2, game.height/2 - 40);\n+    ctx.font=\"16px Arial\";\n+    ctx.fillText(\"You scored \" + game.score + \" and got to level \" + game.level, game.width / 2, game.height/2);\n+    ctx.font=\"16px Arial\";\n+    ctx.fillText(\"Press 'Space' to play again.\", game.width / 2, game.height/2 + 40);\n+};\n+\n+GameOverState.prototype.keyDown = function(game, keyCode) {\n+    if(keyCode == KEY_SPACE) {\n+        //  Space restarts the game.\n+        game.lives = 3;\n+        game.score = 0;\n+        game.level = 1;\n+        game.moveToState(new LevelIntroState(1));\n+    }\n+};\n+\n+//  Create a PlayState with the game config and the level you are on.\n+function PlayState(config, level) {\n+    this.config = config;\n+    this.level = level;\n+\n+    //  Game state.\n+    this.invaderCurrentVelocity =  10;\n+    this.invaderCurrentDropDistance =  0;\n+    this.invadersAreDropping =  false;\n+    this.lastRocketTime = null;\n+\n+    //  Game entities.\n+    this.ship = null;\n+    this.invaders = [];\n+    this.rockets = [];\n+    this.bombs = [];\n+}\n+\n+PlayState.prototype.enter = function(game) {\n+\n+    //  Create the ship.\n+    this.ship = new Ship(game.width / 2, game.gameBounds.bottom);\n+\n+    //  Setup initial state.\n+    this.invaderCurrentVelocity =  10;\n+    this.invaderCurrentDropDistance =  0;\n+    this.invadersAreDropping =  false;\n+\n+    //  Set the ship speed for this level, as well as invader params.\n+    var levelMultiplier = this.level * this.config.levelDifficultyMultiplier;\n+    var limitLevel = (this.level < this.config.limitLevelIncrease ? this.level : this.config.limitLevelIncrease);\n+    this.shipSpeed = this.config.shipSpeed;\n+    this.invaderInitialVelocity = this.config.invaderInitialVelocity + 1.5 * (levelMultiplier * this.config.invaderInitialVelocity);\n+    this.bombRate = this.config.bombRate + (levelMultiplier * this.config.bombRate);\n+    this.bombMinVelocity = this.config.bombMinVelocity + (levelMultiplier * this.config.bombMinVelocity);\n+    this.bombMaxVelocity = this.config.bombMaxVelocity + (levelMultiplier * this.config.bombMaxVelocity);\n+    this.rocketMaxFireRate = this.config.rocketMaxFireRate + 0.4 * limitLevel;\n+\n+    //  Create the invaders.\n+    var ranks = this.config.invaderRanks + 0.1 * limitLevel;\n+    var files = this.config.invaderFiles + 0.2 * limitLevel;\n+    var invaders = [];\n+    for(var rank = 0; rank < ranks; rank++){\n+        for(var file = 0; file < files; file++) {\n+            invaders.push(new Invader(\n+                (game.width / 2) + ((files/2 - file) * 200 / files),\n+                (game.gameBounds.top + rank * 20),\n+                rank, file, 'Invader'));\n+        }\n+    }\n+    this.invaders = invaders;\n+    this.invaderCurrentVelocity = this.invaderInitialVelocity;\n+    this.invaderVelocity = {x: -this.invaderInitialVelocity, y:0};\n+    this.invaderNextVelocity = null;\n+};\n+\n+PlayState.prototype.update = function(game, dt) {\n+\n+    //  If the left or right arrow keys are pressed, move\n+    //  the ship. Check this on ticks rather than via a keydown\n+    //  event for smooth movement, otherwise the ship would move\n+    //  more like a text editor caret.\n+    if(game.pressedKeys[KEY_LEFT]) {\n+        this.ship.x -= this.shipSpeed * dt;\n+    }\n+    if(game.pressedKeys[KEY_RIGHT]) {\n+        this.ship.x += this.shipSpeed * dt;\n+    }\n+    if(game.pressedKeys[KEY_SPACE]) {\n+        this.fireRocket();\n+    }\n+\n+    //  Keep the ship in bounds.\n+    if(this.ship.x < game.gameBounds.left) {\n+        this.ship.x = game.gameBounds.left;\n+    }\n+    if(this.ship.x > game.gameBounds.right) {\n+        this.ship.x = game.gameBounds.right;\n+    }\n+\n+    //  Move each bomb.\n+    for(var i=0; i<this.bombs.length; i++) {\n+        var bomb = this.bombs[i];\n+        bomb.y += dt * bomb.velocity;\n+\n+        //  If the rocket has gone off the screen remove it.\n+        if(bomb.y > this.height) {\n+            this.bombs.splice(i--, 1);\n+        }\n+    }\n+\n+    //  Move each rocket.\n+    for(i=0; i<this.rockets.length; i++) {\n+        var rocket = this.rockets[i];\n+        rocket.y -= dt * rocket.velocity;\n+\n+        //  If the rocket has gone off the screen remove it.\n+        if(rocket.y < 0) {\n+            this.rockets.splice(i--, 1);\n+        }\n+    }\n+\n+    //  Move the invaders.\n+    var hitLeft = false, hitRight = false, hitBottom = false;\n+    for(i=0; i<this.invaders.length; i++) {\n+        var invader = this.invaders[i];\n+        var newx = invader.x + this.invaderVelocity.x * dt;\n+        var newy = invader.y + this.invaderVelocity.y * dt;\n+        if(hitLeft == false && newx < game.gameBounds.left) {\n+            hitLeft = true;\n+        }\n+        else if(hitRight == false && newx > game.gameBounds.right) {\n+            hitRight = true;\n+        }\n+        else if(hitBottom == false && newy > game.gameBounds.bottom) {\n+            hitBottom = true;\n+        }\n+\n+        if(!hitLeft && !hitRight && !hitBottom) {\n+            invader.x = newx;\n+            invader.y = newy;\n+        }\n+    }\n+\n+    //  Update invader velocities.\n+    if(this.invadersAreDropping) {\n+        this.invaderCurrentDropDistance += this.invaderVelocity.y * dt;\n+        if(this.invaderCurrentDropDistance >= this.config.invaderDropDistance) {\n+            this.invadersAreDropping = false;\n+            this.invaderVelocity = this.invaderNextVelocity;\n+            this.invaderCurrentDropDistance = 0;\n+        }\n+    }\n+    //  If we've hit the left, move down then right.\n+    if(hitLeft) {\n+        this.invaderCurrentVelocity += this.config.invaderAcceleration;\n+        this.invaderVelocity = {x: 0, y:this.invaderCurrentVelocity };\n+        this.invadersAreDropping = true;\n+        this.invaderNextVelocity = {x: this.invaderCurrentVelocity , y:0};\n+    }\n+    //  If we've hit the right, move down then left.\n+    if(hitRight) {\n+        this.invaderCurrentVelocity += this.config.invaderAcceleration;\n+        this.invaderVelocity = {x: 0, y:this.invaderCurrentVelocity };\n+        this.invadersAreDropping = true;\n+        this.invaderNextVelocity = {x: -this.invaderCurrentVelocity , y:0};\n+    }\n+    //  If we've hit the bottom, it's game over.\n+    if(hitBottom) {\n+        this.lives = 0;\n+    }\n+\n+    //  Check for rocket/invader collisions.\n+    for(i=0; i<this.invaders.length; i++) {\n+        var invader = this.invaders[i];\n+        var bang = false;\n+\n+        for(var j=0; j<this.rockets.length; j++){\n+            var rocket = this.rockets[j];\n+\n+            if(rocket.x >= (invader.x - invader.width/2) && rocket.x <= (invader.x + invader.width/2) &&\n+                rocket.y >= (invader.y - invader.height/2) && rocket.y <= (invader.y + invader.height/2)) {\n+\n+                //  Remove the rocket, set 'bang' so we don't process\n+                //  this rocket again.\n+                this.rockets.splice(j--, 1);\n+                bang = true;\n+                game.score += this.config.pointsPerInvader;\n+                break;\n+            }\n+        }\n+        if(bang) {\n+            this.invaders.splice(i--, 1);\n+            game.sounds.playSound('bang');\n+        }\n+    }\n+\n+    //  Find all of the front rank invaders.\n+    var frontRankInvaders = {};\n+    for(var i=0; i<this.invaders.length; i++) {\n+        var invader = this.invaders[i];\n+        //  If we have no invader for game file, or the invader\n+        //  for game file is futher behind, set the front\n+        //  rank invader to game one.\n+        if(!frontRankInvaders[invader.file] || frontRankInvaders[invader.file].rank < invader.rank) {\n+            frontRankInvaders[invader.file] = invader;\n+        }\n+    }\n+\n+    //  Give each front rank invader a chance to drop a bomb.\n+    for(var i=0; i<this.config.invaderFiles; i++) {\n+        var invader = frontRankInvaders[i];\n+        if(!invader) continue;\n+        var chance = this.bombRate * dt;\n+        if(chance > Math.random()) {\n+            //  Fire!\n+            this.bombs.push(new Bomb(invader.x, invader.y + invader.height / 2,\n+                this.bombMinVelocity + Math.random()*(this.bombMaxVelocity - this.bombMinVelocity)));\n+        }\n+    }\n+\n+    //  Check for bomb/ship collisions.\n+    for(var i=0; i<this.bombs.length; i++) {\n+        var bomb = this.bombs[i];\n+        if(bomb.x >= (this.ship.x - this.ship.width/2) && bomb.x <= (this.ship.x + this.ship.width/2) &&\n+            bomb.y >= (this.ship.y - this.ship.height/2) && bomb.y <= (this.ship.y + this.ship.height/2)) {\n+            this.bombs.splice(i--, 1);\n+            game.lives--;\n+            game.sounds.playSound('explosion');\n+        }\n+\n+    }\n+\n+    //  Check for invader/ship collisions.\n+    for(var i=0; i<this.invaders.length; i++) {\n+        var invader = this.invaders[i];\n+        if((invader.x + invader.width/2) > (this.ship.x - this.ship.width/2) &&\n+            (invader.x - invader.width/2) < (this.ship.x + this.ship.width/2) &&\n+            (invader.y + invader.height/2) > (this.ship.y - this.ship.height/2) &&\n+            (invader.y - invader.height/2) < (this.ship.y + this.ship.height/2)) {\n+            //  Dead by collision!\n+            game.lives = 0;\n+            game.sounds.playSound('explosion');\n+        }\n+    }\n+\n+    //  Check for failure\n+    if(game.lives <= 0) {\n+        game.moveToState(new GameOverState());\n+    }\n+\n+    //  Check for victory\n+    if(this.invaders.length === 0) {\n+        game.score += this.level * 50;\n+        game.level += 1;\n+        game.moveToState(new LevelIntroState(game.level));\n+    }\n+};\n+\n+PlayState.prototype.draw = function(game, dt, ctx) {\n+\n+    //  Clear the background.\n+    ctx.clearRect(0, 0, game.width, game.height);\n+\n+    //  Draw ship.\n+    ctx.fillStyle = '#999999';\n+    ctx.fillRect(this.ship.x - (this.ship.width / 2), this.ship.y - (this.ship.height / 2), this.ship.width, this.ship.height);\n+\n+    //  Draw invaders.\n+\n+    for(var i=0; i<this.invaders.length; i++) {\n+        var fillStyle = ['#2ac940', '#ff4945', '#cbbeb5', '#dad3f2', '#ffdab9', '#f0f8ff'][i % 6];\n+\n+        ctx.fillStyle = fillStyle;\n+        var invader = this.invaders[i];\n+        ctx.fillRect(invader.x - invader.width/2, invader.y - invader.height/2, invader.width, invader.height);\n+    }\n+\n+    //  Draw bombs.\n+    //ctx.fillStyle = '#ff5555';\n+    for(var i=0; i<this.bombs.length; i++) {\n+        var fillStyle = ['#2ac940', '#ff4945', '#cbbeb5', '#dad3f2', '#ffdab9'][i % 5];","path":"assets/js/spaceinvaders.js","position":581,"original_position":581,"commit_id":"de65217feff9e4fc9ae13a2e1d0ab83d0eac9882","original_commit_id":"de65217feff9e4fc9ae13a2e1d0ab83d0eac9882","user":{"login":"hound[bot]","id":30008653,"node_id":"MDM6Qm90MzAwMDg2NTM=","avatar_url":"https://avatars1.githubusercontent.com/in/3598?v=4","gravatar_id":"","url":"https://api.github.com/users/hound%5Bbot%5D","html_url":"https://github.com/apps/hound","followers_url":"https://api.github.com/users/hound%5Bbot%5D/followers","following_url":"https://api.github.com/users/hound%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/hound%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/hound%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hound%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/hound%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/hound%5Bbot%5D/repos","events_url":"https://api.github.com/users/hound%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/hound%5Bbot%5D/received_events","type":"Bot","site_admin":false},"body":"'fillStyle' is already defined         no-redeclare","created_at":"2018-11-29T13:35:44Z","updated_at":"2018-11-29T13:35:45Z","html_url":"https://github.com/fuchsia-programming/fuchsia-programming.github.io/pull/16#discussion_r237487730","pull_request_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/pulls/16","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/pulls/comments/237487730"},"html":{"href":"https://github.com/fuchsia-programming/fuchsia-programming.github.io/pull/16#discussion_r237487730"},"pull_request":{"href":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/pulls/16","id":234639776,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM0NjM5Nzc2","html_url":"https://github.com/fuchsia-programming/fuchsia-programming.github.io/pull/16","diff_url":"https://github.com/fuchsia-programming/fuchsia-programming.github.io/pull/16.diff","patch_url":"https://github.com/fuchsia-programming/fuchsia-programming.github.io/pull/16.patch","issue_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/issues/16","number":16,"state":"open","locked":false,"title":"Add invaders","user":{"login":"jbampton","id":418747,"node_id":"MDQ6VXNlcjQxODc0Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/418747?v=4","gravatar_id":"","url":"https://api.github.com/users/jbampton","html_url":"https://github.com/jbampton","followers_url":"https://api.github.com/users/jbampton/followers","following_url":"https://api.github.com/users/jbampton/following{/other_user}","gists_url":"https://api.github.com/users/jbampton/gists{/gist_id}","starred_url":"https://api.github.com/users/jbampton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbampton/subscriptions","organizations_url":"https://api.github.com/users/jbampton/orgs","repos_url":"https://api.github.com/users/jbampton/repos","events_url":"https://api.github.com/users/jbampton/events{/privacy}","received_events_url":"https://api.github.com/users/jbampton/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-29T13:35:22Z","updated_at":"2018-11-29T13:35:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"500fcc255ce62810ccfd4403386e408a92e3fcbb","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/pulls/16/commits","review_comments_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/pulls/16/comments","review_comment_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/issues/16/comments","statuses_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/statuses/de65217feff9e4fc9ae13a2e1d0ab83d0eac9882","head":{"label":"jbampton:add-invaders","ref":"add-invaders","sha":"de65217feff9e4fc9ae13a2e1d0ab83d0eac9882","user":{"login":"jbampton","id":418747,"node_id":"MDQ6VXNlcjQxODc0Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/418747?v=4","gravatar_id":"","url":"https://api.github.com/users/jbampton","html_url":"https://github.com/jbampton","followers_url":"https://api.github.com/users/jbampton/followers","following_url":"https://api.github.com/users/jbampton/following{/other_user}","gists_url":"https://api.github.com/users/jbampton/gists{/gist_id}","starred_url":"https://api.github.com/users/jbampton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbampton/subscriptions","organizations_url":"https://api.github.com/users/jbampton/orgs","repos_url":"https://api.github.com/users/jbampton/repos","events_url":"https://api.github.com/users/jbampton/events{/privacy}","received_events_url":"https://api.github.com/users/jbampton/received_events","type":"User","site_admin":false},"repo":{"id":157209788,"node_id":"MDEwOlJlcG9zaXRvcnkxNTcyMDk3ODg=","name":"fuchsia-programming.github.io","full_name":"jbampton/fuchsia-programming.github.io","private":false,"owner":{"login":"jbampton","id":418747,"node_id":"MDQ6VXNlcjQxODc0Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/418747?v=4","gravatar_id":"","url":"https://api.github.com/users/jbampton","html_url":"https://github.com/jbampton","followers_url":"https://api.github.com/users/jbampton/followers","following_url":"https://api.github.com/users/jbampton/following{/other_user}","gists_url":"https://api.github.com/users/jbampton/gists{/gist_id}","starred_url":"https://api.github.com/users/jbampton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbampton/subscriptions","organizations_url":"https://api.github.com/users/jbampton/orgs","repos_url":"https://api.github.com/users/jbampton/repos","events_url":"https://api.github.com/users/jbampton/events{/privacy}","received_events_url":"https://api.github.com/users/jbampton/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jbampton/fuchsia-programming.github.io","description":"We like Fuchsia Flowers. Fuchsia Programming is the place for Fuchsia enthusiasts, whether it's pink, purple or fuchsia we have it all for you !?!?!!! :)","fork":true,"url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io","forks_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/forks","keys_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/teams","hooks_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/hooks","issue_events_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/issues/events{/number}","events_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/events","assignees_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/assignees{/user}","branches_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/branches{/branch}","tags_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/tags","blobs_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/statuses/{sha}","languages_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/languages","stargazers_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/stargazers","contributors_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/contributors","subscribers_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/subscribers","subscription_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/subscription","commits_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/contents/{+path}","compare_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/merges","archive_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/downloads","issues_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/issues{/number}","pulls_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/pulls{/number}","milestones_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/milestones{/number}","notifications_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/labels{/name}","releases_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/releases{/id}","deployments_url":"https://api.github.com/repos/jbampton/fuchsia-programming.github.io/deployments","created_at":"2018-11-12T12:24:48Z","updated_at":"2018-11-29T08:51:49Z","pushed_at":"2018-11-29T13:28:53Z","git_url":"git://github.com/jbampton/fuchsia-programming.github.io.git","ssh_url":"git@github.com:jbampton/fuchsia-programming.github.io.git","clone_url":"https://github.com/jbampton/fuchsia-programming.github.io.git","svn_url":"https://github.com/jbampton/fuchsia-programming.github.io","homepage":"https://fuchsia-programming.github.io/","size":108656,"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":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fuchsia-programming:master","ref":"master","sha":"7189ee10b12e1f8d4092e4bbb9fafbb30309fc42","user":{"login":"fuchsia-programming","id":42722307,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyNzIyMzA3","avatar_url":"https://avatars1.githubusercontent.com/u/42722307?v=4","gravatar_id":"","url":"https://api.github.com/users/fuchsia-programming","html_url":"https://github.com/fuchsia-programming","followers_url":"https://api.github.com/users/fuchsia-programming/followers","following_url":"https://api.github.com/users/fuchsia-programming/following{/other_user}","gists_url":"https://api.github.com/users/fuchsia-programming/gists{/gist_id}","starred_url":"https://api.github.com/users/fuchsia-programming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fuchsia-programming/subscriptions","organizations_url":"https://api.github.com/users/fuchsia-programming/orgs","repos_url":"https://api.github.com/users/fuchsia-programming/repos","events_url":"https://api.github.com/users/fuchsia-programming/events{/privacy}","received_events_url":"https://api.github.com/users/fuchsia-programming/received_events","type":"Organization","site_admin":false},"repo":{"id":147964241,"node_id":"MDEwOlJlcG9zaXRvcnkxNDc5NjQyNDE=","name":"fuchsia-programming.github.io","full_name":"fuchsia-programming/fuchsia-programming.github.io","private":false,"owner":{"login":"fuchsia-programming","id":42722307,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyNzIyMzA3","avatar_url":"https://avatars1.githubusercontent.com/u/42722307?v=4","gravatar_id":"","url":"https://api.github.com/users/fuchsia-programming","html_url":"https://github.com/fuchsia-programming","followers_url":"https://api.github.com/users/fuchsia-programming/followers","following_url":"https://api.github.com/users/fuchsia-programming/following{/other_user}","gists_url":"https://api.github.com/users/fuchsia-programming/gists{/gist_id}","starred_url":"https://api.github.com/users/fuchsia-programming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fuchsia-programming/subscriptions","organizations_url":"https://api.github.com/users/fuchsia-programming/orgs","repos_url":"https://api.github.com/users/fuchsia-programming/repos","events_url":"https://api.github.com/users/fuchsia-programming/events{/privacy}","received_events_url":"https://api.github.com/users/fuchsia-programming/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/fuchsia-programming/fuchsia-programming.github.io","description":"We like Fuchsia Flowers. Fuchsia Programming is the place for Fuchsia enthusiasts, whether it's pink, purple or fuchsia we have it all for you !?!?!!! :)","fork":false,"url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io","forks_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/forks","keys_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/teams","hooks_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/hooks","issue_events_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/issues/events{/number}","events_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/events","assignees_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/assignees{/user}","branches_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/branches{/branch}","tags_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/tags","blobs_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/statuses/{sha}","languages_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/languages","stargazers_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/stargazers","contributors_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/contributors","subscribers_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/subscribers","subscription_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/subscription","commits_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/contents/{+path}","compare_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/merges","archive_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/downloads","issues_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/issues{/number}","pulls_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/pulls{/number}","milestones_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/milestones{/number}","notifications_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/labels{/name}","releases_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/releases{/id}","deployments_url":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/deployments","created_at":"2018-09-08T19:37:32Z","updated_at":"2018-11-29T08:45:26Z","pushed_at":"2018-11-29T13:35:23Z","git_url":"git://github.com/fuchsia-programming/fuchsia-programming.github.io.git","ssh_url":"git@github.com:fuchsia-programming/fuchsia-programming.github.io.git","clone_url":"https://github.com/fuchsia-programming/fuchsia-programming.github.io.git","svn_url":"https://github.com/fuchsia-programming/fuchsia-programming.github.io","homepage":"https://fuchsia-programming.github.io/","size":108656,"stargazers_count":7,"watchers_count":7,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":2,"open_issues":1,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/pulls/16"},"html":{"href":"https://github.com/fuchsia-programming/fuchsia-programming.github.io/pull/16"},"issue":{"href":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/issues/16"},"comments":{"href":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/fuchsia-programming/fuchsia-programming.github.io/statuses/de65217feff9e4fc9ae13a2e1d0ab83d0eac9882"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"hound"}}