summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
190f38a)
This is a non-functional simplification. Since our file_bb handles either Files or Squares, using Square here removes some code. Not likely any performance difference despite the test.
STC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 6081 W: 1444 L: 1291 D: 3346
http://tests.stockfishchess.org/tests/view/
5ceb3e2e0ebc5925cf07ab03
Non functional change.
score += RookOnPawn * popcount(pos.pieces(Them, PAWN) & PseudoAttacks[ROOK][s]);
// Bonus for rook on an open or semi-open file
score += RookOnPawn * popcount(pos.pieces(Them, PAWN) & PseudoAttacks[ROOK][s]);
// Bonus for rook on an open or semi-open file
- if (pos.is_semiopen_file(Us, file_of(s)))
- score += RookOnFile[bool(pos.is_semiopen_file(Them, file_of(s)))];
+ if (pos.is_on_semiopen_file(Us, s))
+ score += RookOnFile[bool(pos.is_on_semiopen_file(Them, s))];
// Penalty when trapped by the king, even more if the king cannot castle
else if (mob <= 3)
// Penalty when trapped by the king, even more if the king cannot castle
else if (mob <= 3)
template<PieceType Pt> int count() const;
template<PieceType Pt> const Square* squares(Color c) const;
template<PieceType Pt> Square square(Color c) const;
template<PieceType Pt> int count() const;
template<PieceType Pt> const Square* squares(Color c) const;
template<PieceType Pt> Square square(Color c) const;
- bool is_semiopen_file(Color c, File f) const;
+ bool is_on_semiopen_file(Color c, Square s) const;
// Castling
int castling_rights(Color c) const;
// Castling
int castling_rights(Color c) const;
-inline bool Position::is_semiopen_file(Color c, File f) const {
- return !(pieces(c, PAWN) & file_bb(f));
+inline bool Position::is_on_semiopen_file(Color c, Square s) const {
+ return !(pieces(c, PAWN) & file_bb(s));
}
inline bool Position::can_castle(CastlingRight cr) const {
}
inline bool Position::can_castle(CastlingRight cr) const {