ai.js
changeset 156 e6a4bc888b72
parent 155 1f8df90bd338
child 160 93c44d730198
child 167 ae123e309e31
--- a/ai.js	Sun Oct 19 01:13:42 2014 +0300
+++ b/ai.js	Sun Oct 19 01:16:11 2014 +0300
@@ -472,7 +472,7 @@
 ai.survive.prototype.analyse = function(brd2d) {
     var origBrd = new this.brdEngine(brd2d);
     var nextBrd = new this.brdEngine();
-    var bestW = -1;
+    var bestW = -2;
     var bestDir;
     var freeCnt = origBrd.freeCnt();
     if (freeCnt >= this.cfg.freeCells)
@@ -481,7 +481,6 @@
         var dir = ai.dirs[i];
         if (origBrd[dir](nextBrd)) {
             var w = this.evalFn(nextBrd, 1);
-            console.log("dir: %s, w: %d", dir, w);
             if (w > bestW) {
                 bestW = w;
                 bestDir = dir;