ai.js
changeset 149 2839f8227a38
parent 148 93c122e0ea90
child 152 07814b979a8a
--- a/ai.js	Fri Sep 26 01:40:08 2014 +0300
+++ b/ai.js	Fri Sep 26 02:21:28 2014 +0300
@@ -201,7 +201,7 @@
     var weight = 0;
     if (this.cfg.scoreCoef > 0)
         weight += this.cfg.scoreCoef * brd.score();
-    var max = brd.max();
+    var max = brd.maxVal();
     if (this.cfg.maxValCoef > 0)
         weight += this.cfg.maxValCoef * max;
     if (this.cfg.cornerBonus > 0 && brd.atCorner(max))
@@ -264,7 +264,7 @@
     var weight = 0;
     if (this.cfg.scoreCoef > 0)
         weight += this.cfg.scoreCoef * brd.score();
-    var max = brd.max();
+    var max = brd.maxVal();
     if (this.cfg.maxValCoef > 0)
         weight += this.cfg.maxValCoef * max;
     if (this.cfg.cornerBonus > 0 && brd.atCorner(max))
@@ -355,7 +355,7 @@
     if (cfg.scoreCoef > 0)
         score += cfg.scoreCoef * brd.score();
     if (cfg.maxValCoef > 0 || cfg.cornerBonus > 0 || cfg.edgeBonus > 0) {
-        var max = brd.max();
+        var max = brd.maxVal();
         if (cfg.maxValCoef > 0)
             score += cfg.maxValCoef * max;
         if (cfg.cornerBonus > 0)