X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.h;h=3da25b6f57e4c6e54b8e62af18c84e9717d385ee;hp=4305759b0cf751c7cfa0f1eaaea3d90fffade9fa;hb=324ca87affc4959f7017e83437fb06b6e770449c;hpb=4f3fe89fb6e957fd971a76080687ba358ec27603 diff --git a/src/position.h b/src/position.h index 4305759b..3da25b6f 100644 --- a/src/position.h +++ b/src/position.h @@ -17,14 +17,9 @@ along with this program. If not, see . */ - #if !defined(POSITION_H_INCLUDED) #define POSITION_H_INCLUDED -//// -//// Includes -//// - #include "bitboard.h" #include "color.h" #include "move.h" @@ -32,21 +27,11 @@ #include "square.h" #include "value.h" - -//// -//// Constants -//// - /// Maximum number of plies per game (220 should be enough, because the /// maximum search depth is 100, and during position setup we reset the /// move counter for every non-reversible move). const int MaxGameLength = 220; - -//// -//// Types -//// - class Position; /// struct checkInfo is initialized at c'tor time and keeps @@ -339,11 +324,6 @@ private: static const Value PieceValueEndgame[17]; }; - -//// -//// Inline functions -//// - inline int64_t Position::nodes_searched() const { return nodes; } @@ -538,9 +518,8 @@ inline int Position::startpos_ply_counter() const { inline bool Position::opposite_colored_bishops() const { - return piece_count(WHITE, BISHOP) == 1 - && piece_count(BLACK, BISHOP) == 1 - && !same_color_squares(piece_list(WHITE, BISHOP, 0), piece_list(BLACK, BISHOP, 0)); + return piece_count(WHITE, BISHOP) == 1 && piece_count(BLACK, BISHOP) == 1 + && opposite_color_squares(piece_list(WHITE, BISHOP, 0), piece_list(BLACK, BISHOP, 0)); } inline bool Position::has_pawn_on_7th(Color c) const {