# HG changeset patch # User Oleksandr Gavenko # Date 1410282045 -10800 # Node ID 30a09d50ae21e8d2bc01c154912e230b6490aae0 # Parent caf0be6d7e68b1621c47d84c2dd47e8e597a9ddd Fix typo. diff -r caf0be6d7e68 -r 30a09d50ae21 ai.js --- a/ai.js Tue Sep 09 19:54:11 2014 +0300 +++ b/ai.js Tue Sep 09 20:00:45 2014 +0300 @@ -36,7 +36,7 @@ ai.blindCycle = function(brdEngine, cfg) { this.brdEngine = brdEngine; this.cfg = cfg || {}; - this.cfg.untilPossible = this.cfg.untilPossible || false; + this.cfg.whilePossible = this.cfg.whilePossible || false; this.cfg.clockwise = this.cfg.clockwise || false; } ai.blindCycle.dirs = ["left", "down", "right", "up"]; @@ -50,7 +50,7 @@ ai.blindCycle.prototype.analyse = function(brd) { var origBrd = new this.brdEngine(brd); this.prevDir = this.prevDir || 0; - if (!this.cfg.untilPossible) + if (!this.cfg.whilePossible) this.prevDir = this.nextDir(this.prevDir); while (true) { if (origBrd[ai.blindCycle.canDirs[this.prevDir]]())