]> git.sesse.net Git - stockfish/blobdiff - src/endgame.cpp
Introduce bitcount.h
[stockfish] / src / endgame.cpp
index f82beef608e2a1772d0ce472847c62754edcead6..90898e8341a58987b46cb0433018cb4d587484e8 100644 (file)
@@ -1,7 +1,7 @@
 /*
   Stockfish, a UCI chess playing engine derived from Glaurung 2.1
   Copyright (C) 2004-2008 Tord Romstad (Glaurung author)
-  Copyright (C) 2008 Marco Costalba
+  Copyright (C) 2008-2009 Marco Costalba
 
   Stockfish is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -25,6 +25,7 @@
 #include <cassert>
 
 #include "bitbase.h"
+#include "bitcount.h"
 #include "endgame.h"
 
 
@@ -377,7 +378,7 @@ Value EvaluationFunction<KBBKN>::apply(const Position& pos) {
   result += Value(square_distance(bksq, nsq) * 32);
 
   // Bonus for restricting the knight's mobility
-  result += Value((8 - count_1s_max_15(pos.piece_attacks<KNIGHT>(nsq))) * 8);
+  result += Value((8 - count_1s_max_15<false>(pos.piece_attacks<KNIGHT>(nsq))) * 8);
 
   return (strongerSide == pos.side_to_move() ? result : -result);
 }