Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 2 bytes modified
parent
4678fb3f59
commit
ec65dfb313
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue