From 0aa96bc1357ca6eaeecc8d01b1d9fe49c8c55c1d Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Sat, 24 Mar 2018 15:18:01 +0100 Subject: [PATCH] Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 199 bytes modified --- 21g30t1e75.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/21g30t1e75.js b/21g30t1e75.js index 49e906b..713b5ab 100644 --- a/21g30t1e75.js +++ b/21g30t1e75.js @@ -65,6 +65,8 @@ GameLib.CustomCode.OBJECT_TYPE_SNAKE_BODY = 1; GameLib.CustomCode.OBJECT_TYPE_FOOD = 2; GameLib.CustomCode.OBJECT_TYPE_POWERUP = 3; +this.extendSpeedGrain = (GameLib.CustomCode.SPEED_INITIAL - GameLib.CustomCode.MAX_SPEED) / (GameLib.CustomCode.GRID_WIDTH * GameLib.CustomCode.GRID_HEIGHT); + /** * Get runtime */ @@ -1157,6 +1159,8 @@ GameLib.CustomCode.prototype.extend = function(gameObject, position, orientation this.gameOver(true); } + this.speed -= this.extendSpeedGrain; + }.bind(this); /**