summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1277a42)
Use an overload instead of a new named function.
I have found this handier and easier when adding
some quick debug code.
No functional change.
& pos.pieces(Them)
& ~ei.attackedBy[Us][PAWN];
& pos.pieces(Them)
& ~ei.attackedBy[Us][PAWN];
score += popcount<Max15>(b) * PawnAttackThreat;
if (Trace)
score += popcount<Max15>(b) * PawnAttackThreat;
if (Trace)
/// Debug functions used mainly to collect run-time statistics
void dbg_hit_on(bool b) { ++hits[0]; if (b) ++hits[1]; }
/// Debug functions used mainly to collect run-time statistics
void dbg_hit_on(bool b) { ++hits[0]; if (b) ++hits[1]; }
-void dbg_hit_on_c(bool c, bool b) { if (c) dbg_hit_on(b); }
+void dbg_hit_on(bool c, bool b) { if (c) dbg_hit_on(b); }
void dbg_mean_of(int v) { ++means[0]; means[1] += v; }
void dbg_print() {
void dbg_mean_of(int v) { ++means[0]; means[1] += v; }
void dbg_print() {
void start_logger(bool b);
void dbg_hit_on(bool b);
void start_logger(bool b);
void dbg_hit_on(bool b);
-void dbg_hit_on_c(bool c, bool b);
+void dbg_hit_on(bool c, bool b);
void dbg_mean_of(int v);
void dbg_print();
void dbg_mean_of(int v);
void dbg_print();
-Key Position::exclusion_key() const { return st->key ^ Zobrist::exclusion;}
+Key Position::exclusion_key() const { return st->key ^ Zobrist::exclusion; }
stm = color_of(piece_on(from));
occupied = pieces() ^ from;
stm = color_of(piece_on(from));
occupied = pieces() ^ from;
- // Castling moves are implemented as king capturing the rook so cannot be
- // handled correctly. Simply return 0 that is always the correct value
+ // Castling moves are implemented as king capturing the rook so cannot
+ // be handled correctly. Simply return VALUE_ZERO that is always correct
// unless in the rare case the rook ends up under attack.
if (type_of(m) == CASTLING)
return VALUE_ZERO;
// unless in the rare case the rook ends up under attack.
if (type_of(m) == CASTLING)
return VALUE_ZERO;