@@ -156,7 +156,7 @@ inline Bitboard file_bb(Square s) {
156156}
157157
158158
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
160160// / all squares on the adjacent files.
161161
162162inline Bitboard adjacent_files_bb (File f) {
@@ -174,7 +174,7 @@ inline Bitboard in_front_bb(Color c, Rank r) {
174174}
175175
176176
177- // / between_bb returns a bitboard representing all squares between two squares.
177+ // / between_bb() returns a bitboard representing all squares between two squares.
178178// / For instance, between_bb(SQ_C4, SQ_F7) returns a bitboard with the bits for
179179// / square d5 and e6 set. If s1 and s2 are not on the same line, file or diagonal,
180180// / 0 is returned.
@@ -184,7 +184,7 @@ inline Bitboard between_bb(Square s1, Square s2) {
184184}
185185
186186
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
188188// / representing all squares along the line in front of the square, from the
189189// / point of view of the given color. Definition of the table is:
190190// / ForwardBB[c][s] = in_front_bb(c, s) & file_bb(s)
@@ -194,27 +194,27 @@ inline Bitboard forward_bb(Color c, Square s) {
194194}
195195
196196
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
208198// / representing all squares that can be attacked by a pawn of the given color
209199// / 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);
211201
212202inline Bitboard pawn_attack_span (Color c, Square s) {
213203 return PawnAttackSpan[c][s];
214204}
215205
216206
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
218218// / either on a straight or on a diagonal line.
219219
220220inline bool squares_aligned (Square s1, Square s2, Square s3) {
0 commit comments