mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
Retire Position::pawn_is_passed() and friends
Absolutely no useful at all, just code obfuscation so use real definition instead. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
1f1ef0897c
commit
a9fa1fc7f7
2 changed files with 3 additions and 18 deletions
|
@ -206,9 +206,9 @@ Score PawnInfoTable::evaluate_pawns(const Position& pos, Bitboard ourPawns,
|
|||
assert(pos.piece_on(s) == piece_of_color_and_type(Us, PAWN));
|
||||
|
||||
// Passed, isolated or doubled pawn?
|
||||
passed = Position::pawn_is_passed(theirPawns, Us, s);
|
||||
isolated = Position::pawn_is_isolated(ourPawns, s);
|
||||
doubled = Position::pawn_is_doubled(ourPawns, Us, s);
|
||||
passed = !(theirPawns & passed_pawn_mask(Us, s));
|
||||
isolated = !(ourPawns & neighboring_files_bb(s));
|
||||
doubled = ourPawns & squares_behind(Us, s);
|
||||
|
||||
// We calculate kingside and queenside pawn storm
|
||||
// scores for both colors. These are used when evaluating
|
||||
|
|
|
@ -228,9 +228,6 @@ public:
|
|||
|
||||
// Information about pawns
|
||||
bool pawn_is_passed(Color c, Square s) const;
|
||||
static bool pawn_is_passed(Bitboard theirPawns, Color c, Square s);
|
||||
static bool pawn_is_isolated(Bitboard ourPawns, Square s);
|
||||
static bool pawn_is_doubled(Bitboard ourPawns, Color c, Square s);
|
||||
|
||||
// Weak squares
|
||||
bool square_is_weak(Square s, Color c) const;
|
||||
|
@ -485,18 +482,6 @@ inline bool Position::pawn_is_passed(Color c, Square s) const {
|
|||
return !(pieces(PAWN, opposite_color(c)) & passed_pawn_mask(c, s));
|
||||
}
|
||||
|
||||
inline bool Position::pawn_is_passed(Bitboard theirPawns, Color c, Square s) {
|
||||
return !(theirPawns & passed_pawn_mask(c, s));
|
||||
}
|
||||
|
||||
inline bool Position::pawn_is_isolated(Bitboard ourPawns, Square s) {
|
||||
return !(ourPawns & neighboring_files_bb(s));
|
||||
}
|
||||
|
||||
inline bool Position::pawn_is_doubled(Bitboard ourPawns, Color c, Square s) {
|
||||
return ourPawns & squares_behind(c, s);
|
||||
}
|
||||
|
||||
inline bool Position::square_is_weak(Square s, Color c) const {
|
||||
return !(pieces(PAWN, c) & outpost_mask(opposite_color(c), s));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue