Skip to content

Commit b8123df

Browse files
author
Jesper Torp Kristensen
committed
Added comments
1 parent f23bcac commit b8123df

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/endgames/endgame_piece_pos.hxx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,18 @@
1212
bool piece_overlap(std::vector<PiecePos> pp);
1313

1414
/**
15-
* TODO
15+
* Sort the entries in the piece order KQRBNPkqrbnp
1616
*/
17-
bool swap_piece_pos(std::vector<PiecePos> &pieces, bool symmetric_endgame_and_btm);
17+
void sort_piece_pos(std::vector<PiecePos> &pieces);
1818

1919
/**
20-
* TODO
20+
* pieces must already be sorted using the above function.
21+
* This function rearranges the pieces to the order required by the endgame tables
22+
* by possible swapping the order such that the black pieces are listed first.
23+
* Returns true if a swap was made - in that case the endgame table must be
24+
* indexed with the opposite color.
2125
*/
22-
void sort_piece_pos(std::vector<PiecePos> &pieces);
26+
bool swap_piece_pos(std::vector<PiecePos> &pieces, bool symmetric_endgame_and_btm);
2327

2428
/**
2529
* If endgame is KBKP, and bishop captured by pawn is being promoted to queen,

0 commit comments

Comments
 (0)