diff --git a/21g30t1e75.js b/21g30t1e75.js index 95d930b..64fe641 100644 --- a/21g30t1e75.js +++ b/21g30t1e75.js @@ -252,7 +252,7 @@ GameLib.CustomCode.SnakeBody.prototype.advance = function(orientation, flip) { switch (orientation) { case GameLib.CustomCode.ORIENTATION_UP : - if ((this.position.y + 1) > GameLib.CustomCode.GRID_HEIGHT) { + if ((this.position.y + 1) >= GameLib.CustomCode.GRID_HEIGHT) { crash = true; } else { this.position.y += 1; @@ -273,7 +273,7 @@ GameLib.CustomCode.SnakeBody.prototype.advance = function(orientation, flip) { } break; case GameLib.CustomCode.ORIENTATION_RIGHT : - if ((this.position.x + 1) > GameLib.CustomCode.GRID_WIDTH) { + if ((this.position.x + 1) >= GameLib.CustomCode.GRID_WIDTH) { crash = true; } else { this.position.x += 1;