]> git.sesse.net Git - stockfish/blobdiff - src/position.h
Retire TheirHalf[]
[stockfish] / src / position.h
index 6defeb22bd9cedc8fbab20b6a50c28773974bc0e..4e15bb136f9997d98e9e070243d142b9836efca2 100644 (file)
@@ -327,7 +327,8 @@ inline bool Position::pawn_passed(Color c, Square s) const {
 }
 
 inline bool Position::advanced_pawn_push(Move m) const {
-  return pieces(PAWN) & TheirHalf[sideToMove] & from_sq(m);
+  return   type_of(moved_piece(m)) == PAWN
+        && relative_rank(sideToMove, from_sq(m)) > RANK_4;
 }
 
 inline Key Position::key() const {