diff --git a/21g30t1e75.js b/21g30t1e75.js index 1768e6f..bf42a47 100644 --- a/21g30t1e75.js +++ b/21g30t1e75.js @@ -243,6 +243,12 @@ GameLib.CustomCode.prototype.createFood = function(delta) { } ) + if (this.food.length >= GameLib.CustomCode.MAX_FOOD_ITEMS) { + this.food.shift(); + } + + this.rebuildGrid(); + }.bind(this);