]> git.sesse.net Git - stockfish/commitdiff
Rename check related functions
authorMarco Costalba <mcostalba@gmail.com>
Fri, 29 Apr 2011 14:26:48 +0000 (16:26 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 29 Apr 2011 17:56:48 +0000 (18:56 +0100)
No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/book.h
src/evaluate.cpp
src/move.cpp
src/movegen.cpp
src/movepick.cpp
src/position.cpp
src/position.h
src/search.cpp

index 55d212a88634b03e00ebad286ad2f5a3aa868b4f..ed68210f8daf83fb14f832b6f0aa709001fe73b2 100644 (file)
@@ -68,5 +68,4 @@ private:
 template<int n> inline uint64_t Book::get_int() { return 256 * get_int<n-1>() + bookFile.get(); }
 template<> inline uint64_t Book::get_int<1>() { return bookFile.get(); }
 
 template<int n> inline uint64_t Book::get_int() { return 256 * get_int<n-1>() + bookFile.get(); }
 template<> inline uint64_t Book::get_int<1>() { return bookFile.get(); }
 
-
 #endif // !defined(BOOK_H_INCLUDED)
 #endif // !defined(BOOK_H_INCLUDED)
index 649842dc87384f568b390e497649f5c62fba6195..c86af7803db8a3e6861ee81c2d45b6c200f0261a 100644 (file)
@@ -292,7 +292,7 @@ Value do_evaluate(const Position& pos, Value& margin) {
 
   assert(pos.is_ok());
   assert(pos.thread() >= 0 && pos.thread() < MAX_THREADS);
 
   assert(pos.is_ok());
   assert(pos.thread() >= 0 && pos.thread() < MAX_THREADS);
-  assert(!pos.is_check());
+  assert(!pos.in_check());
 
   // Initialize value by reading the incrementally updated scores included
   // in the position object (material + piece square tables).
 
   // Initialize value by reading the incrementally updated scores included
   // in the position object (material + piece square tables).
index ff0adbe5b6d7cfce860b30b732d7dc17e7cccd0f..da9e977dc611633e361db33e36467d46030777c4 100644 (file)
@@ -156,11 +156,11 @@ const string move_to_san(Position& pos, Move m) {
       }
   }
 
       }
   }
 
-  // The move gives check? We don't use pos.move_is_check() here
+  // The move gives check? We don't use pos.move_gives_check() here
   // because we need to test for a mate after the move is done.
   StateInfo st;
   pos.do_move(m, st);
   // because we need to test for a mate after the move is done.
   StateInfo st;
   pos.do_move(m, st);
-  if (pos.is_check())
+  if (pos.in_check())
       san += pos.is_mate() ? "#" : "+";
   pos.undo_move(m);
 
       san += pos.is_mate() ? "#" : "+";
   pos.undo_move(m);
 
index 64c6ac50135d83ea121d1b950c315578cb629ef3..f38d42261ccfbdf827cdc5d9ad1c813f812a4aff 100644 (file)
@@ -151,7 +151,7 @@ template<MoveType Type>
 MoveStack* generate(const Position& pos, MoveStack* mlist) {
 
   assert(pos.is_ok());
 MoveStack* generate(const Position& pos, MoveStack* mlist) {
 
   assert(pos.is_ok());
-  assert(!pos.is_check());
+  assert(!pos.in_check());
 
   Color us = pos.side_to_move();
   Bitboard target;
 
   Color us = pos.side_to_move();
   Bitboard target;
@@ -202,7 +202,7 @@ template<>
 MoveStack* generate<MV_NON_CAPTURE_CHECK>(const Position& pos, MoveStack* mlist) {
 
   assert(pos.is_ok());
 MoveStack* generate<MV_NON_CAPTURE_CHECK>(const Position& pos, MoveStack* mlist) {
 
   assert(pos.is_ok());
-  assert(!pos.is_check());
+  assert(!pos.in_check());
 
   Bitboard b, dc;
   Square from;
 
   Bitboard b, dc;
   Square from;
@@ -243,7 +243,7 @@ template<>
 MoveStack* generate<MV_EVASION>(const Position& pos, MoveStack* mlist) {
 
   assert(pos.is_ok());
 MoveStack* generate<MV_EVASION>(const Position& pos, MoveStack* mlist) {
 
   assert(pos.is_ok());
-  assert(pos.is_check());
+  assert(pos.in_check());
 
   Bitboard b, target;
   Square from, checksq;
 
   Bitboard b, target;
   Square from, checksq;
@@ -311,7 +311,7 @@ MoveStack* generate<MV_PSEUDO_LEGAL>(const Position& pos, MoveStack* mlist) {
 
   assert(pos.is_ok());
 
 
   assert(pos.is_ok());
 
-  return pos.is_check() ? generate<MV_EVASION>(pos, mlist)
+  return pos.in_check() ? generate<MV_EVASION>(pos, mlist)
                         : generate<MV_NON_EVASION>(pos, mlist);
 }
 
                         : generate<MV_NON_EVASION>(pos, mlist);
 }
 
index 8872e39f3691a8740a8ba1244f8fc3c4664951c5..d8c9fbbb3341622b4407956894e5656ce8460d32 100644 (file)
@@ -65,7 +65,7 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const History& h,
 
   pinned = p.pinned_pieces(pos.side_to_move());
 
 
   pinned = p.pinned_pieces(pos.side_to_move());
 
-  if (p.is_check())
+  if (p.in_check())
   {
       ttMoves[1].move = killers[0].move = killers[1].move = MOVE_NONE;
       phasePtr = EvasionTable;
   {
       ttMoves[1].move = killers[0].move = killers[1].move = MOVE_NONE;
       phasePtr = EvasionTable;
@@ -99,7 +99,7 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const History& h)
 
   pinned = p.pinned_pieces(pos.side_to_move());
 
 
   pinned = p.pinned_pieces(pos.side_to_move());
 
-  if (p.is_check())
+  if (p.in_check())
       phasePtr = EvasionTable;
   else if (d >= DEPTH_QS_CHECKS)
       phasePtr = QsearchWithChecksTable;
       phasePtr = EvasionTable;
   else if (d >= DEPTH_QS_CHECKS)
       phasePtr = QsearchWithChecksTable;
@@ -157,7 +157,7 @@ void MovePicker::go_next_phase() {
       return;
 
   case PH_EVASIONS:
       return;
 
   case PH_EVASIONS:
-      assert(pos.is_check());
+      assert(pos.in_check());
       lastMove = generate<MV_EVASION>(pos, moves);
       score_evasions();
       return;
       lastMove = generate<MV_EVASION>(pos, moves);
       score_evasions();
       return;
index 9f9069cdf67c318264353bb73e5f9d0d317c6627..e71499ce9b35a02177b23872b12bd8b330de5035 100644 (file)
@@ -623,7 +623,7 @@ bool Position::pl_move_is_legal(Move m, Bitboard pinned) const {
 
 bool Position::pl_move_is_evasion(Move m, Bitboard pinned) const
 {
 
 bool Position::pl_move_is_evasion(Move m, Bitboard pinned) const
 {
-  assert(is_check());
+  assert(in_check());
 
   Color us = side_to_move();
   Square from = move_from(m);
 
   Color us = side_to_move();
   Square from = move_from(m);
@@ -750,18 +750,18 @@ bool Position::move_is_legal(const Move m, Bitboard pinned) const {
       return false;
 
   // The move is pseudo-legal, check if it is also legal
       return false;
 
   // The move is pseudo-legal, check if it is also legal
-  return is_check() ? pl_move_is_evasion(m, pinned) : pl_move_is_legal(m, pinned);
+  return in_check() ? pl_move_is_evasion(m, pinned) : pl_move_is_legal(m, pinned);
 }
 
 
 }
 
 
-/// Position::move_is_check() tests whether a pseudo-legal move is a check
+/// Position::move_gives_check() tests whether a pseudo-legal move is a check
 
 
-bool Position::move_is_check(Move m) const {
+bool Position::move_gives_check(Move m) const {
 
 
-  return move_is_check(m, CheckInfo(*this));
+  return move_gives_check(m, CheckInfo(*this));
 }
 
 }
 
-bool Position::move_is_check(Move m, const CheckInfo& ci) const {
+bool Position::move_gives_check(Move m, const CheckInfo& ci) const {
 
   assert(is_ok());
   assert(move_is_ok(m));
 
   assert(is_ok());
   assert(move_is_ok(m));
@@ -883,7 +883,7 @@ void Position::do_setup_move(Move m) {
 void Position::do_move(Move m, StateInfo& newSt) {
 
   CheckInfo ci(*this);
 void Position::do_move(Move m, StateInfo& newSt) {
 
   CheckInfo ci(*this);
-  do_move(m, newSt, ci, move_is_check(m, ci));
+  do_move(m, newSt, ci, move_gives_check(m, ci));
 }
 
 void Position::do_move(Move m, StateInfo& newSt, const CheckInfo& ci, bool moveIsCheck) {
 }
 
 void Position::do_move(Move m, StateInfo& newSt, const CheckInfo& ci, bool moveIsCheck) {
@@ -1430,7 +1430,7 @@ void Position::undo_castle_move(Move m) {
 void Position::do_null_move(StateInfo& backupSt) {
 
   assert(is_ok());
 void Position::do_null_move(StateInfo& backupSt) {
 
   assert(is_ok());
-  assert(!is_check());
+  assert(!in_check());
 
   // Back up the information necessary to undo the null move to the supplied
   // StateInfo object.
 
   // Back up the information necessary to undo the null move to the supplied
   // StateInfo object.
@@ -1467,7 +1467,7 @@ void Position::do_null_move(StateInfo& backupSt) {
 void Position::undo_null_move() {
 
   assert(is_ok());
 void Position::undo_null_move() {
 
   assert(is_ok());
-  assert(!is_check());
+  assert(!in_check());
 
   // Restore information from the our backup StateInfo object
   StateInfo* backupSt = st->previous;
 
   // Restore information from the our backup StateInfo object
   StateInfo* backupSt = st->previous;
@@ -1798,7 +1798,7 @@ bool Position::is_draw() const {
 bool Position::is_mate() const {
 
   MoveStack moves[MAX_MOVES];
 bool Position::is_mate() const {
 
   MoveStack moves[MAX_MOVES];
-  return is_check() && generate<MV_LEGAL>(*this, moves) == moves;
+  return in_check() && generate<MV_LEGAL>(*this, moves) == moves;
 }
 
 
 }
 
 
index b811e8c62597b1ee7a3d2152fc54d249c3661fea..de2afbfd95cb2182cce382588328d56e5030564b 100644 (file)
@@ -168,7 +168,7 @@ public:
 
   // Checking pieces and under check information
   Bitboard checkers() const;
 
   // Checking pieces and under check information
   Bitboard checkers() const;
-  bool is_check() const;
+  bool in_check() const;
 
   // Piece lists
   Square piece_list(Color c, PieceType pt, int index) const;
 
   // Piece lists
   Square piece_list(Color c, PieceType pt, int index) const;
@@ -186,8 +186,8 @@ public:
   bool pl_move_is_evasion(Move m, Bitboard pinned) const;
   bool move_is_legal(const Move m) const;
   bool move_is_legal(const Move m, Bitboard pinned) const;
   bool pl_move_is_evasion(Move m, Bitboard pinned) const;
   bool move_is_legal(const Move m) const;
   bool move_is_legal(const Move m, Bitboard pinned) const;
-  bool move_is_check(Move m) const;
-  bool move_is_check(Move m, const CheckInfo& ci) const;
+  bool move_gives_check(Move m) const;
+  bool move_gives_check(Move m, const CheckInfo& ci) const;
   bool move_is_capture(Move m) const;
   bool move_is_capture_or_promotion(Move m) const;
   bool move_is_passed_pawn_push(Move m) const;
   bool move_is_capture(Move m) const;
   bool move_is_capture_or_promotion(Move m) const;
   bool move_is_passed_pawn_push(Move m) const;
@@ -454,7 +454,7 @@ inline Bitboard Position::checkers() const {
   return st->checkersBB;
 }
 
   return st->checkersBB;
 }
 
-inline bool Position::is_check() const {
+inline bool Position::in_check() const {
   return st->checkersBB != EmptyBoardBB;
 }
 
   return st->checkersBB != EmptyBoardBB;
 }
 
index 1ae6b892c8d4d245b18f4fb9d730c799a8d01d4a..9cfd09e2ffa11c85f2bf8f047363dbfe3759056e 100644 (file)
@@ -341,7 +341,7 @@ int64_t perft(Position& pos, Depth depth) {
   for (MoveStack* cur = mlist; cur != last; cur++)
   {
       m = cur->move;
   for (MoveStack* cur = mlist; cur != last; cur++)
   {
       m = cur->move;
-      pos.do_move(m, st, ci, pos.move_is_check(m, ci));
+      pos.do_move(m, st, ci, pos.move_gives_check(m, ci));
       sum += perft(pos, depth - ONE_PLY);
       pos.undo_move(m);
   }
       sum += perft(pos, depth - ONE_PLY);
       pos.undo_move(m);
   }
@@ -512,7 +512,7 @@ namespace {
     if (Rml.size() == 0)
     {
         cout << "info depth 0 score "
     if (Rml.size() == 0)
     {
         cout << "info depth 0 score "
-             << value_to_uci(pos.is_check() ? -VALUE_MATE : VALUE_DRAW)
+             << value_to_uci(pos.in_check() ? -VALUE_MATE : VALUE_DRAW)
              << endl;
 
         return MOVE_NONE;
              << endl;
 
         return MOVE_NONE;
@@ -681,14 +681,14 @@ namespace {
     ValueType vt;
     Value bestValue, value, oldAlpha;
     Value refinedValue, nullValue, futilityBase, futilityValueScaled; // Non-PV specific
     ValueType vt;
     Value bestValue, value, oldAlpha;
     Value refinedValue, nullValue, futilityBase, futilityValueScaled; // Non-PV specific
-    bool isPvMove, isCheck, singularExtensionNode, moveIsCheck, captureOrPromotion, dangerous, isBadCap;
+    bool isPvMove, inCheck, singularExtensionNode, givesCheck, captureOrPromotion, dangerous, isBadCap;
     int moveCount = 0, playedMoveCount = 0;
     int threadID = pos.thread();
     SplitPoint* sp = NULL;
 
     refinedValue = bestValue = value = -VALUE_INFINITE;
     oldAlpha = alpha;
     int moveCount = 0, playedMoveCount = 0;
     int threadID = pos.thread();
     SplitPoint* sp = NULL;
 
     refinedValue = bestValue = value = -VALUE_INFINITE;
     oldAlpha = alpha;
-    isCheck = pos.is_check();
+    inCheck = pos.in_check();
     ss->ply = (ss-1)->ply + 1;
 
     // Used to send selDepth info to GUI
     ss->ply = (ss-1)->ply + 1;
 
     // Used to send selDepth info to GUI
@@ -753,7 +753,7 @@ namespace {
     }
 
     // Step 5. Evaluate the position statically and update parent's gain statistics
     }
 
     // Step 5. Evaluate the position statically and update parent's gain statistics
-    if (isCheck)
+    if (inCheck)
         ss->eval = ss->evalMargin = VALUE_NONE;
     else if (tte)
     {
         ss->eval = ss->evalMargin = VALUE_NONE;
     else if (tte)
     {
@@ -775,7 +775,7 @@ namespace {
     // Step 6. Razoring (is omitted in PV nodes)
     if (   !PvNode
         &&  depth < RazorDepth
     // Step 6. Razoring (is omitted in PV nodes)
     if (   !PvNode
         &&  depth < RazorDepth
-        && !isCheck
+        && !inCheck
         &&  refinedValue + razor_margin(depth) < beta
         &&  ttMove == MOVE_NONE
         &&  abs(beta) < VALUE_MATE_IN_PLY_MAX
         &&  refinedValue + razor_margin(depth) < beta
         &&  ttMove == MOVE_NONE
         &&  abs(beta) < VALUE_MATE_IN_PLY_MAX
@@ -795,7 +795,7 @@ namespace {
     if (   !PvNode
         && !ss->skipNullMove
         &&  depth < RazorDepth
     if (   !PvNode
         && !ss->skipNullMove
         &&  depth < RazorDepth
-        && !isCheck
+        && !inCheck
         &&  refinedValue - futility_margin(depth, 0) >= beta
         &&  abs(beta) < VALUE_MATE_IN_PLY_MAX
         &&  pos.non_pawn_material(pos.side_to_move()))
         &&  refinedValue - futility_margin(depth, 0) >= beta
         &&  abs(beta) < VALUE_MATE_IN_PLY_MAX
         &&  pos.non_pawn_material(pos.side_to_move()))
@@ -805,7 +805,7 @@ namespace {
     if (   !PvNode
         && !ss->skipNullMove
         &&  depth > ONE_PLY
     if (   !PvNode
         && !ss->skipNullMove
         &&  depth > ONE_PLY
-        && !isCheck
+        && !inCheck
         &&  refinedValue >= beta
         &&  abs(beta) < VALUE_MATE_IN_PLY_MAX
         &&  pos.non_pawn_material(pos.side_to_move()))
         &&  refinedValue >= beta
         &&  abs(beta) < VALUE_MATE_IN_PLY_MAX
         &&  pos.non_pawn_material(pos.side_to_move()))
@@ -863,7 +863,7 @@ namespace {
     // Step 9. Internal iterative deepening
     if (   depth >= IIDDepth[PvNode]
         && ttMove == MOVE_NONE
     // Step 9. Internal iterative deepening
     if (   depth >= IIDDepth[PvNode]
         && ttMove == MOVE_NONE
-        && (PvNode || (!isCheck && ss->eval + IIDMargin >= beta)))
+        && (PvNode || (!inCheck && ss->eval + IIDMargin >= beta)))
     {
         Depth d = (PvNode ? depth - 2 * ONE_PLY : depth / 2);
 
     {
         Depth d = (PvNode ? depth - 2 * ONE_PLY : depth / 2);
 
@@ -937,11 +937,11 @@ split_point_start: // At split points actual search starts from here
 
       // At Root and at first iteration do a PV search on all the moves to score root moves
       isPvMove = (PvNode && moveCount <= (Root ? depth <= ONE_PLY ? 1000 : MultiPV : 1));
 
       // At Root and at first iteration do a PV search on all the moves to score root moves
       isPvMove = (PvNode && moveCount <= (Root ? depth <= ONE_PLY ? 1000 : MultiPV : 1));
-      moveIsCheck = pos.move_is_check(move, ci);
+      givesCheck = pos.move_gives_check(move, ci);
       captureOrPromotion = pos.move_is_capture_or_promotion(move);
 
       // Step 11. Decide the new search depth
       captureOrPromotion = pos.move_is_capture_or_promotion(move);
 
       // Step 11. Decide the new search depth
-      ext = extension<PvNode>(pos, move, captureOrPromotion, moveIsCheck, &dangerous);
+      ext = extension<PvNode>(pos, move, captureOrPromotion, givesCheck, &dangerous);
 
       // Singular extension search. If all moves but one fail low on a search of
       // (alpha-s, beta-s), and just one fails high on (alpha, beta), then that move
 
       // Singular extension search. If all moves but one fail low on a search of
       // (alpha-s, beta-s), and just one fails high on (alpha, beta), then that move
@@ -975,7 +975,7 @@ split_point_start: // At split points actual search starts from here
       // Step 12. Futility pruning (is omitted in PV nodes)
       if (   !PvNode
           && !captureOrPromotion
       // Step 12. Futility pruning (is omitted in PV nodes)
       if (   !PvNode
           && !captureOrPromotion
-          && !isCheck
+          && !inCheck
           && !dangerous
           &&  move != ttMove
           && !move_is_castle(move))
           && !dangerous
           &&  move != ttMove
           && !move_is_castle(move))
@@ -1035,7 +1035,7 @@ split_point_start: // At split points actual search starts from here
                 &&  pos.see_sign(move) < 0;
 
       // Step 13. Make the move
                 &&  pos.see_sign(move) < 0;
 
       // Step 13. Make the move
-      pos.do_move(move, st, ci, moveIsCheck);
+      pos.do_move(move, st, ci, givesCheck);
 
       if (!SpNode && !captureOrPromotion)
           movesSearched[playedMoveCount++] = move;
 
       if (!SpNode && !captureOrPromotion)
           movesSearched[playedMoveCount++] = move;
@@ -1202,7 +1202,7 @@ split_point_start: // At split points actual search starts from here
     // no legal moves, it must be mate or stalemate.
     // If one move was excluded return fail low score.
     if (!SpNode && !moveCount)
     // no legal moves, it must be mate or stalemate.
     // If one move was excluded return fail low score.
     if (!SpNode && !moveCount)
-        return excludedMove ? oldAlpha : isCheck ? value_mated_in(ss->ply) : VALUE_DRAW;
+        return excludedMove ? oldAlpha : inCheck ? value_mated_in(ss->ply) : VALUE_DRAW;
 
     // Step 20. Update tables
     // If the search is not aborted, update the transposition table,
 
     // Step 20. Update tables
     // If the search is not aborted, update the transposition table,
@@ -1257,7 +1257,7 @@ split_point_start: // At split points actual search starts from here
     StateInfo st;
     Move ttMove, move;
     Value bestValue, value, evalMargin, futilityValue, futilityBase;
     StateInfo st;
     Move ttMove, move;
     Value bestValue, value, evalMargin, futilityValue, futilityBase;
-    bool isCheck, enoughMaterial, moveIsCheck, evasionPrunable;
+    bool inCheck, enoughMaterial, givesCheck, evasionPrunable;
     const TTEntry* tte;
     Depth ttDepth;
     Value oldAlpha = alpha;
     const TTEntry* tte;
     Depth ttDepth;
     Value oldAlpha = alpha;
@@ -1272,8 +1272,8 @@ split_point_start: // At split points actual search starts from here
     // Decide whether or not to include checks, this fixes also the type of
     // TT entry depth that we are going to use. Note that in qsearch we use
     // only two types of depth in TT: DEPTH_QS_CHECKS or DEPTH_QS_NO_CHECKS.
     // Decide whether or not to include checks, this fixes also the type of
     // TT entry depth that we are going to use. Note that in qsearch we use
     // only two types of depth in TT: DEPTH_QS_CHECKS or DEPTH_QS_NO_CHECKS.
-    isCheck = pos.is_check();
-    ttDepth = (isCheck || depth >= DEPTH_QS_CHECKS ? DEPTH_QS_CHECKS : DEPTH_QS_NO_CHECKS);
+    inCheck = pos.in_check();
+    ttDepth = (inCheck || depth >= DEPTH_QS_CHECKS ? DEPTH_QS_CHECKS : DEPTH_QS_NO_CHECKS);
 
     // Transposition table lookup. At PV nodes, we don't use the TT for
     // pruning, but only for move ordering.
 
     // Transposition table lookup. At PV nodes, we don't use the TT for
     // pruning, but only for move ordering.
@@ -1287,7 +1287,7 @@ split_point_start: // At split points actual search starts from here
     }
 
     // Evaluate the position statically
     }
 
     // Evaluate the position statically
-    if (isCheck)
+    if (inCheck)
     {
         bestValue = futilityBase = -VALUE_INFINITE;
         ss->eval = evalMargin = VALUE_NONE;
     {
         bestValue = futilityBase = -VALUE_INFINITE;
         ss->eval = evalMargin = VALUE_NONE;
@@ -1337,12 +1337,12 @@ split_point_start: // At split points actual search starts from here
     {
       assert(move_is_ok(move));
 
     {
       assert(move_is_ok(move));
 
-      moveIsCheck = pos.move_is_check(move, ci);
+      givesCheck = pos.move_gives_check(move, ci);
 
       // Futility pruning
       if (   !PvNode
 
       // Futility pruning
       if (   !PvNode
-          && !isCheck
-          && !moveIsCheck
+          && !inCheck
+          && !givesCheck
           &&  move != ttMove
           &&  enoughMaterial
           && !move_is_promotion(move)
           &&  move != ttMove
           &&  enoughMaterial
           && !move_is_promotion(move)
@@ -1367,14 +1367,14 @@ split_point_start: // At split points actual search starts from here
       }
 
       // Detect non-capture evasions that are candidate to be pruned
       }
 
       // Detect non-capture evasions that are candidate to be pruned
-      evasionPrunable =   isCheck
+      evasionPrunable =   inCheck
                        && bestValue > VALUE_MATED_IN_PLY_MAX
                        && !pos.move_is_capture(move)
                        && !pos.can_castle(pos.side_to_move());
 
       // Don't search moves with negative SEE values
       if (   !PvNode
                        && bestValue > VALUE_MATED_IN_PLY_MAX
                        && !pos.move_is_capture(move)
                        && !pos.can_castle(pos.side_to_move());
 
       // Don't search moves with negative SEE values
       if (   !PvNode
-          && (!isCheck || evasionPrunable)
+          && (!inCheck || evasionPrunable)
           &&  move != ttMove
           && !move_is_promotion(move)
           &&  pos.see_sign(move) < 0)
           &&  move != ttMove
           && !move_is_promotion(move)
           &&  pos.see_sign(move) < 0)
@@ -1382,8 +1382,8 @@ split_point_start: // At split points actual search starts from here
 
       // Don't search useless checks
       if (   !PvNode
 
       // Don't search useless checks
       if (   !PvNode
-          && !isCheck
-          &&  moveIsCheck
+          && !inCheck
+          &&  givesCheck
           &&  move != ttMove
           && !pos.move_is_capture_or_promotion(move)
           &&  ss->eval + PawnValueMidgame / 4 < beta
           &&  move != ttMove
           && !pos.move_is_capture_or_promotion(move)
           &&  ss->eval + PawnValueMidgame / 4 < beta
@@ -1399,7 +1399,7 @@ split_point_start: // At split points actual search starts from here
       ss->currentMove = move;
 
       // Make and search the move
       ss->currentMove = move;
 
       // Make and search the move
-      pos.do_move(move, st, ci, moveIsCheck);
+      pos.do_move(move, st, ci, givesCheck);
       value = -qsearch<PvNode>(pos, ss+1, -beta, -alpha, depth-ONE_PLY);
       pos.undo_move(move);
 
       value = -qsearch<PvNode>(pos, ss+1, -beta, -alpha, depth-ONE_PLY);
       pos.undo_move(move);
 
@@ -1419,7 +1419,7 @@ split_point_start: // At split points actual search starts from here
 
     // All legal moves have been searched. A special case: If we're in check
     // and no legal moves were found, it is checkmate.
 
     // All legal moves have been searched. A special case: If we're in check
     // and no legal moves were found, it is checkmate.
-    if (isCheck && bestValue == -VALUE_INFINITE)
+    if (inCheck && bestValue == -VALUE_INFINITE)
         return value_mated_in(ss->ply);
 
     // Update transposition table
         return value_mated_in(ss->ply);
 
     // Update transposition table
@@ -1627,7 +1627,7 @@ split_point_start: // At split points actual search starts from here
 
     assert(move_is_ok(m));
     assert(threat && move_is_ok(threat));
 
     assert(move_is_ok(m));
     assert(threat && move_is_ok(threat));
-    assert(!pos.move_is_check(m));
+    assert(!pos.move_gives_check(m));
     assert(!pos.move_is_capture_or_promotion(m));
     assert(!pos.move_is_passed_pawn_push(m));
 
     assert(!pos.move_is_capture_or_promotion(m));
     assert(!pos.move_is_passed_pawn_push(m));
 
@@ -2022,7 +2022,7 @@ split_point_start: // At split points actual search starts from here
         // Don't overwrite existing correct entries
         if (!tte || tte->move() != pv[ply])
         {
         // Don't overwrite existing correct entries
         if (!tte || tte->move() != pv[ply])
         {
-            v = (pos.is_check() ? VALUE_NONE : evaluate(pos, m));
+            v = (pos.in_check() ? VALUE_NONE : evaluate(pos, m));
             TT.store(k, VALUE_NONE, VALUE_TYPE_NONE, DEPTH_NONE, pv[ply], v, m);
         }
         pos.do_move(pv[ply], *st++);
             TT.store(k, VALUE_NONE, VALUE_TYPE_NONE, DEPTH_NONE, pv[ply], v, m);
         }
         pos.do_move(pv[ply], *st++);