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]]())