]> git.sesse.net Git - stockfish/blobdiff - src/movepick.cpp
Code style in tt.cpp
[stockfish] / src / movepick.cpp
index a7e5bdac78ba0a9bf17304de41380cd667a9f5f6..95310bd826364f8bb7739ac1d9e2dd8659be1205 100644 (file)
@@ -24,7 +24,7 @@
 #include "movegen.h"
 #include "movepick.h"
 #include "search.h"
-#include "value.h"
+#include "types.h"
 
 namespace {
 
@@ -217,9 +217,7 @@ void MovePicker::score_captures() {
 }
 
 void MovePicker::score_noncaptures() {
-  // First score by history, when no history is available then use
-  // piece/square tables values. This seems to be better then a
-  // random choice when we don't have an history for any move.
+  // Score by history and max gain for the move.
   Move m;
   Piece piece;
   Square from, to;
@@ -280,7 +278,7 @@ Move MovePicker::get_next_move() {
           case PH_TT_MOVES:
               move = (curMove++)->move;
               if (   move != MOVE_NONE
-                  && move_is_legal(pos, move, pinned))
+                  && pos.move_is_legal(move, pinned))
                   return move;
               break;
 
@@ -305,7 +303,7 @@ Move MovePicker::get_next_move() {
           case PH_KILLERS:
               move = (curMove++)->move;
               if (   move != MOVE_NONE
-                  && move_is_legal(pos, move, pinned)
+                  && pos.move_is_legal(move, pinned)
                   && move != ttMoves[0].move
                   && move != ttMoves[1].move
                   && !pos.move_is_capture(move))