@@ -156,7 +156,7 @@ inline Bitboard file_bb(Square s) {
156
156
}
157
157
158
158
159
- // / adjacent_files_bb takes a file as input and returns a bitboard representing
159
+ // / adjacent_files_bb() takes a file as input and returns a bitboard representing
160
160
// / all squares on the adjacent files.
161
161
162
162
inline Bitboard adjacent_files_bb (File f) {
@@ -174,7 +174,7 @@ inline Bitboard in_front_bb(Color c, Rank r) {
174
174
}
175
175
176
176
177
- // / between_bb returns a bitboard representing all squares between two squares.
177
+ // / between_bb() returns a bitboard representing all squares between two squares.
178
178
// / For instance, between_bb(SQ_C4, SQ_F7) returns a bitboard with the bits for
179
179
// / square d5 and e6 set. If s1 and s2 are not on the same line, file or diagonal,
180
180
// / 0 is returned.
@@ -184,7 +184,7 @@ inline Bitboard between_bb(Square s1, Square s2) {
184
184
}
185
185
186
186
187
- // / forward_bb takes a color and a square as input, and returns a bitboard
187
+ // / forward_bb() takes a color and a square as input, and returns a bitboard
188
188
// / representing all squares along the line in front of the square, from the
189
189
// / point of view of the given color. Definition of the table is:
190
190
// / ForwardBB[c][s] = in_front_bb(c, s) & file_bb(s)
@@ -194,27 +194,27 @@ inline Bitboard forward_bb(Color c, Square s) {
194
194
}
195
195
196
196
197
- // / passed_pawn_mask takes a color and a square as input, and returns a
198
- // / bitboard mask which can be used to test if a pawn of the given color on
199
- // / the given square is a passed pawn. Definition of the table is:
200
- // / PassedPawnMask[c][s] = in_front_bb(c, s) & this_and_adjacent_files_bb(s)
201
-
202
- inline Bitboard passed_pawn_mask (Color c, Square s) {
203
- return PassedPawnMask[c][s];
204
- }
205
-
206
-
207
- // / attack_span_mask takes a color and a square as input, and returns a bitboard
197
+ // / pawn_attack_span() takes a color and a square as input, and returns a bitboard
208
198
// / representing all squares that can be attacked by a pawn of the given color
209
199
// / when it moves along its file starting from the given square. Definition is:
210
- // / AttackSpanMask [c][s] = in_front_bb(c, s) & adjacent_files_bb(s);
200
+ // / PawnAttackSpan [c][s] = in_front_bb(c, s) & adjacent_files_bb(s);
211
201
212
202
inline Bitboard pawn_attack_span (Color c, Square s) {
213
203
return PawnAttackSpan[c][s];
214
204
}
215
205
216
206
217
- // / squares_aligned returns true if the squares s1, s2 and s3 are aligned
207
+ // / passed_pawn_mask() takes a color and a square as input, and returns a
208
+ // / bitboard mask which can be used to test if a pawn of the given color on
209
+ // / the given square is a passed pawn. Definition of the table is:
210
+ // / PassedPawnMask[c][s] = pawn_attack_span(c, s) | forward_bb(c, s)
211
+
212
+ inline Bitboard passed_pawn_mask (Color c, Square s) {
213
+ return PassedPawnMask[c][s];
214
+ }
215
+
216
+
217
+ // / squares_aligned() returns true if the squares s1, s2 and s3 are aligned
218
218
// / either on a straight or on a diagonal line.
219
219
220
220
inline bool squares_aligned (Square s1, Square s2, Square s3) {
0 commit comments