It will be used by future patches and also rearranges some
half cooked code that mistakenly ended up in master in the
past.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
-///
-PieceType Position::captured_piece() const {
- return st->capture;
-}
-
/// Position::see() is a static exchange evaluator: It tries to estimate the
/// material gain or loss resulting from a move. There are three versions of
/// this function: One which takes a destination square as input, one takes a
/// Position::see() is a static exchange evaluator: It tries to estimate the
/// material gain or loss resulting from a move. There are three versions of
/// this function: One which takes a destination square as input, one takes a
bool move_is_passed_pawn_push(Move m) const;
bool move_attacks_square(Move m, Square s) const;
bool move_is_passed_pawn_push(Move m) const;
bool move_attacks_square(Move m, Square s) const;
+ // Piece captured with previous moves
+ PieceType captured_piece() const;
+
// Information about pawns
bool pawn_is_passed(Color c, Square s) const;
static bool pawn_is_passed(Bitboard theirPawns, Color c, Square s);
// Information about pawns
bool pawn_is_passed(Color c, Square s) const;
static bool pawn_is_passed(Bitboard theirPawns, Color c, Square s);
void do_null_move(StateInfo& st);
void undo_null_move();
void do_null_move(StateInfo& st);
void undo_null_move();
- // Past
- PieceType captured_piece() const;
-
// Static exchange evaluation
int see(Square from, Square to) const;
int see(Move m) const;
// Static exchange evaluation
int see(Square from, Square to) const;
int see(Move m) const;
return (m & (0x1F << 12)) ? !move_is_castle(m) : !square_is_empty(move_to(m));
}
return (m & (0x1F << 12)) ? !move_is_castle(m) : !square_is_empty(move_to(m));
}
+inline PieceType Position::captured_piece() const {
+ return st->capture;
+}
+
#endif // !defined(POSITION_H_INCLUDED)
#endif // !defined(POSITION_H_INCLUDED)