Merge branch 'master' of https://github.com/official-stockfish/Stockfish
authorFabian Fichter <ianfab@users.noreply.github.com>
Wed, 17 Apr 2019 19:46:06 +0000 (21:46 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Wed, 17 Apr 2019 19:46:06 +0000 (21:46 +0200)
bench: 3359419

1  2 
src/evaluate.cpp
src/movepick.h
src/pawns.cpp
src/position.h

Simple merge
diff --cc src/movepick.h
Simple merge
diff --cc src/pawns.cpp
Simple merge
diff --cc src/position.h
@@@ -198,7 -129,7 +198,8 @@@ public
    // Piece specific
    bool pawn_passed(Color c, Square s) const;
    bool opposite_bishops() const;
 +  bool is_promoted(Square s) const;
+   int  pawns_on_same_color_squares(Color c, Square s) const;
  
    // Doing and undoing moves
    void do_move(Move m, StateInfo& newSt);
@@@ -728,9 -321,13 +729,13 @@@ inline bool Position::pawn_passed(Colo
  
  inline bool Position::advanced_pawn_push(Move m) const {
    return   type_of(moved_piece(m)) == PAWN
 -        && relative_rank(sideToMove, from_sq(m)) > RANK_4;
 +        && relative_rank(sideToMove, from_sq(m), max_rank()) > (max_rank() + 1) / 2 - 1;
  }
  
+ inline int Position::pawns_on_same_color_squares(Color c, Square s) const {
+   return popcount(pieces(c, PAWN) & ((DarkSquares & s) ? DarkSquares : ~DarkSquares));
+ }
  inline Key Position::key() const {
    return st->key;
  }