X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fposition.h;h=f145249c75051cd50403e550ab23a28576a92ace;hb=c9dcda6ac488c0058ebd567e1f52e30b8cd0db20;hp=6defeb22bd9cedc8fbab20b6a50c28773974bc0e;hpb=69a14554eebc1467db7234e354bfd864fa46b1b9;p=stockfish diff --git a/src/position.h b/src/position.h index 6defeb22..f145249c 100644 --- a/src/position.h +++ b/src/position.h @@ -1,7 +1,7 @@ /* Stockfish, a UCI chess playing engine derived from Glaurung 2.1 Copyright (C) 2004-2008 Tord Romstad (Glaurung author) - Copyright (C) 2008-2013 Marco Costalba, Joona Kiiski, Tord Romstad + Copyright (C) 2008-2014 Marco Costalba, Joona Kiiski, Tord Romstad Stockfish is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -141,7 +141,7 @@ public: void undo_null_move(); // Static exchange evaluation - int see(Move m, int asymmThreshold = 0) const; + int see(Move m) const; int see_sign(Move m) const; // Accessing hash keys @@ -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 { @@ -378,7 +379,7 @@ inline bool Position::is_chess960() const { inline bool Position::capture_or_promotion(Move m) const { assert(is_ok(m)); - return type_of(m) ? type_of(m) != CASTLING : !empty(to_sq(m)); + return type_of(m) != NORMAL ? type_of(m) != CASTLING : !empty(to_sq(m)); } inline bool Position::capture(Move m) const {