mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 16:46:30 +08:00
Better document square flipping helpers
No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -236,7 +236,7 @@ void Bitboards::init() {
|
||||
{
|
||||
Square to = s + Square(c == WHITE ? steps[pt][k] : -steps[pt][k]);
|
||||
|
||||
if (square_is_ok(to) && square_distance(s, to) < 3)
|
||||
if (is_ok(to) && square_distance(s, to) < 3)
|
||||
StepAttacksBB[make_piece(c, pt)][s] |= to;
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ namespace {
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
for (Square s = sq + deltas[i];
|
||||
square_is_ok(s) && square_distance(s, s - deltas[i]) == 1;
|
||||
is_ok(s) && square_distance(s, s - deltas[i]) == 1;
|
||||
s += deltas[i])
|
||||
{
|
||||
attack |= s;
|
||||
|
||||
Reference in New Issue
Block a user