src/bitmask.cpp
Bitboard reverse(Bitboard bb) {
    for (int i = 0; i < 6; i++) {
        int s(1 << i);
        Bitboard f((Bitboard)(1) << s);
        Bitboard k((Bitboard)(-1) / (f + 1) );
        bb = ((bb >> s) & k) + f * (bb & k);
    }
    return bb;
}
/**
 * Reverses the order of the bits of the bitboard (also akin to "folding" A1 to H8)
 * @param bb bitboard to be reversed
 * @return reversed bitboard
 */
Reverses the order of the bits of the bitboard (also akin to "folding" A1 to H8)
@param bb bitboard to be reversed
@return reversed bitboard
Reverses the order of the bits of the bitboard ( also akin to " folding " A1 to H8 ) @param bb bitboard to be reversed @return reversed bitboard
Bitboard reverse(Bitboard bb) {
    for (int i = 0; i < 6; i++) {
        int s(1 << i);
        Bitboard f((Bitboard)(1) << s);
        Bitboard k((Bitboard)(-1) / (f + 1) );
        bb = ((bb >> s) & k) + f * (bb & k);
    }
    return bb;
}
Bitboard reverse ( Bitboard bb ) { for ( int i = 0 ; i < 6 ; i ++ ) { int s ( 1 << i ) ; Bitboard f ( ( Bitboard ) ( 1 ) << s ) ; Bitboard k ( ( Bitboard ) ( -1 ) / ( f + 1 ) ) ; bb = ( ( bb >> s ) & k ) + f * ( bb & k ) ; } return bb ; }
Reverses the order of the bits of the bitboard (also akin to "folding" A1 to H8)
 @param bb bitboard to be reversed
 @return reversed bitboard
Reverses the order of the bits of the bitboard ( also akin to " folding " A1 to H8 ) @param bb bitboard to be reversed @return reversed bitboard