- Square strongKing = relative_square(strongSide, pos.square<KING>(strongSide));
- Square weakKing = relative_square(strongSide, pos.square<KING>(weakSide));
- Square strongRook = relative_square(strongSide, pos.square<ROOK>(strongSide));
- Square weakPawn = relative_square(strongSide, pos.square<PAWN>(weakSide));
- Square queeningSquare = make_square(file_of(weakPawn), RANK_1);
+ Square strongKing = pos.square<KING>(strongSide);
+ Square weakKing = pos.square<KING>(weakSide);
+ Square strongRook = pos.square<ROOK>(strongSide);
+ Square weakPawn = pos.square<PAWN>(weakSide);
+ Square queeningSquare = make_square(file_of(weakPawn), relative_rank(weakSide, RANK_8));