ai.js
changeset 135 935a500cea3b
parent 126 e634761d0432
child 136 4a143572b9d2
--- a/ai.js	Wed Sep 24 22:35:35 2014 +0300
+++ b/ai.js	Wed Sep 24 22:55:49 2014 +0300
@@ -337,9 +337,9 @@
         if (cfg.edgeBonus > 0)
             if (brd.atEdge(max))
                 score += cfg.edgeBonus;
-        if (cfg.freeBonus > 0)
-            score += cfg.freeBonus * brd.free();
     }
+    if (cfg.freeBonus > 0)
+        score += cfg.freeBonus * brd.free();
     return score;
 }
 ai.expectimax.prototype.analyse = function(brd) {