From 74e9931bba3ee347b4ffca56c2e55bd6f295b5e9 Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Sun, 22 Jun 2014 13:51:55 -0700 Subject: [PATCH] Face a random direction when you stop at a light --- moonlight/src/AISprite.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moonlight/src/AISprite.js b/moonlight/src/AISprite.js index 3e39d5b..616b08b 100644 --- a/moonlight/src/AISprite.js +++ b/moonlight/src/AISprite.js @@ -316,7 +316,7 @@ var AISprite = function(game, x, y, key, frame) { this.turnRandomDirection = function() { var directions = [STATE_FACE_DOWN, STATE_FACE_LEFT, STATE_FACE_RIGHT, STATE_FACE_UP]; - setMovingState(this, game.rnd.integerInRange(0, 3]); + setMovingState(this, game.rnd.integerInRange(0, 3)); this.animations.stop(); this.animations.play("bipedrun" + spriteFacing(this)); this.animations.stop();