Skip to content

Commit 438445c

Browse files
committed
fixed mismatches between docstring and function variable names following renaming
1 parent df60ef8 commit 438445c

File tree

8 files changed

+22
-22
lines changed

8 files changed

+22
-22
lines changed

include/bitbishop/bitboard.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ class Bitboard {
375375
public:
376376
/**
377377
* @brief Constructs an iterator for a given bit pattern.
378-
* @param b The 64-bit bitboard value to iterate over.
378+
* @param bitboard The 64-bit bitboard value to iterate over.
379379
*/
380380
constexpr Iterator(uint64_t bitboard) noexcept : bits(bitboard) {}
381381

include/bitbishop/board.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,21 +65,21 @@ class Board {
6565

6666
/**
6767
* @brief Retrieves the piece on a given square.
68-
* @param sq The square to query.
68+
* @param square The square to query.
6969
* @return Piece located on `sq' or std::nullopt if no piece lays on that square.
7070
*/
7171
[[nodiscard]] std::optional<Piece> get_piece(Square square) const;
7272

7373
/**
7474
* @brief (Re)Places a piece on a given square.
75-
* @param sq The square where the piece will be placed.
76-
* @param p The piece type (including color).
75+
* @param square The square where the piece will be placed.
76+
* @param piece The piece type (including color).
7777
*/
7878
void set_piece(Square square, Piece piece);
7979

8080
/**
8181
* @brief Removes any piece from a given square.
82-
* @param sq The square to clear.
82+
* @param square The square to clear.
8383
*/
8484
void remove_piece(Square square);
8585

include/bitbishop/lookups/bishop.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Lookups {
99

1010
/**
1111
* @brief Generates a bitboard of all squares a bishop can attack moving northeast from the given square.
12-
* @param sq The square index (0-63).
12+
* @param square The square index (0-63).
1313
* @return Bitboard of all squares attacked by a bishop moving northeast.
1414
*/
1515
constexpr uint64_t bishop_northeast_attacks(int square) {
@@ -28,7 +28,7 @@ constexpr uint64_t bishop_northeast_attacks(int square) {
2828

2929
/**
3030
* @brief Generates a bitboard of all squares a bishop can attack moving northwest from the given square.
31-
* @param sq The square index (0-63).
31+
* @param square The square index (0-63).
3232
* @return Bitboard of all squares attacked by a bishop moving northwest.
3333
*/
3434
constexpr uint64_t bishop_northwest_attacks(int square) {
@@ -47,7 +47,7 @@ constexpr uint64_t bishop_northwest_attacks(int square) {
4747

4848
/**
4949
* @brief Generates a bitboard of all squares a bishop can attack moving southeast from the given square.
50-
* @param sq The square index (0-63).
50+
* @param square The square index (0-63).
5151
* @return Bitboard of all squares attacked by a bishop moving southeast.
5252
*/
5353
constexpr uint64_t bishop_southeast_attacks(int square) {
@@ -66,7 +66,7 @@ constexpr uint64_t bishop_southeast_attacks(int square) {
6666

6767
/**
6868
* @brief Generates a bitboard of all squares a bishop can attack moving southwest from the given square.
69-
* @param sq The square index (0-63).
69+
* @param square The square index (0-63).
7070
* @return Bitboard of all squares attacked by a bishop moving southwest.
7171
*/
7272
constexpr uint64_t bishop_southwest_attacks(int square) {
@@ -85,7 +85,7 @@ constexpr uint64_t bishop_southwest_attacks(int square) {
8585

8686
/**
8787
* @brief Generates a bitboard of all squares a bishop can attack from the given square in all directions.
88-
* @param sq The square index (0-63).
88+
* @param square The square index (0-63).
8989
* @return Bitboard of all squares attacked by a bishop from the given square.
9090
*/
9191
constexpr uint64_t bishop_attacks_for_square(int square) {

include/bitbishop/lookups/king.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace Lookups {
1212
* Given a square index (0-63), returns a bitboard with all squares attacked by a king from that square.
1313
* Takes into account board edges to avoid wrap-around attacks.
1414
*
15-
* @param sq The square index (0 = a1, 63 = h8).
15+
* @param square The square index (0 = a1, 63 = h8).
1616
* @return Bitboard representing all possible king attacks from the given square.
1717
*/
1818
constexpr uint64_t king_attacks_for_square(int square) {

include/bitbishop/lookups/knight.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace Lookups {
1212
* Given a square index (0-63), returns a bitboard with all squares attacked by a knight from that square.
1313
* Takes into account board edges to avoid wrap-around attacks.
1414
*
15-
* @param sq The square index (0 = a1, 63 = h8).
15+
* @param square The square index (0 = a1, 63 = h8).
1616
* @return Bitboard representing all possible knight attacks from the given square.
1717
*/
1818
constexpr uint64_t knight_attacks_for_square(int square) {

include/bitbishop/lookups/queen.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace Lookups {
1111

1212
/**
1313
* @brief Generates a bitboard of all squares a queen can attack from the given square in all directions.
14-
* @param sq The square index (0-63).
14+
* @param square The square index (0-63).
1515
* @return Bitboard of all squares attacked by a queen from the given square.
1616
*
1717
* Note that queen moves is the combination of rook and bishop moves.

include/bitbishop/lookups/rook.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Lookups {
99

1010
/**
1111
* @brief Generates a bitboard of all squares a rook can attack moving north from the given square.
12-
* @param sq The square index (0-63).
12+
* @param square The square index (0-63).
1313
* @return Bitboard of all squares attacked by a rook moving north.
1414
*/
1515
constexpr uint64_t rook_north_attacks(int square) {
@@ -26,7 +26,7 @@ constexpr uint64_t rook_north_attacks(int square) {
2626

2727
/**
2828
* @brief Generates a bitboard of all squares a rook can attack moving south from the given square.
29-
* @param sq The square index (0-63).
29+
* @param square The square index (0-63).
3030
* @return Bitboard of all squares attacked by a rook moving south.
3131
*/
3232
constexpr uint64_t rook_south_attacks(int square) {
@@ -43,7 +43,7 @@ constexpr uint64_t rook_south_attacks(int square) {
4343

4444
/**
4545
* @brief Generates a bitboard of all squares a rook can attack moving east from the given square.
46-
* @param sq The square index (0-63).
46+
* @param square The square index (0-63).
4747
* @return Bitboard of all squares attacked by a rook moving east.
4848
*/
4949
constexpr uint64_t rook_east_attacks(int square) {
@@ -60,7 +60,7 @@ constexpr uint64_t rook_east_attacks(int square) {
6060

6161
/**
6262
* @brief Generates a bitboard of all squares a rook can attack moving west from the given square.
63-
* @param sq The square index (0-63).
63+
* @param square The square index (0-63).
6464
* @return Bitboard of all squares attacked by a rook moving west.
6565
*/
6666
constexpr uint64_t rook_west_attacks(int square) {
@@ -77,7 +77,7 @@ constexpr uint64_t rook_west_attacks(int square) {
7777

7878
/**
7979
* @brief Generates a bitboard of all squares a rook can attack from the given square in all directions.
80-
* @param sq The square index (0-63).
80+
* @param square The square index (0-63).
8181
* @return Bitboard of all squares attacked by a rook from the given square.
8282
*/
8383
constexpr uint64_t rook_attacks_for_square(int square) {

include/bitbishop/moves/pawn_move_gen.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ void add_pawn_promotions(std::vector<Move>& moves, Square from, Square to, Color
6868
* Pawns start on rank 2 (index 1) for White and rank 7 (index 6) for Black.
6969
* This is used to determine if a pawn is eligible to perform a double push.
7070
*
71-
* @param sq Square to check
72-
* @param c Color of the pawn
71+
* @param square Square to check
72+
* @param color Color of the pawn
7373
* @return true if the square is on the starting rank for the given color, false otherwise
7474
*/
7575
constexpr bool is_starting_rank(Square square, Color color) {
@@ -82,8 +82,8 @@ constexpr bool is_starting_rank(Square square, Color color) {
8282
*
8383
* Pawns promote when reaching rank 8 (index 7) for White or rank 1 (index 0) for Black.
8484
*
85-
* @param sq Square to check
86-
* @param c Color of the pawn
85+
* @param square Square to check
86+
* @param color Color of the pawn
8787
* @return true if the square is on the promotion rank for the given color, false otherwise
8888
*/
8989
constexpr bool is_promotion_rank(Square square, Color color) {

0 commit comments

Comments
 (0)