src/attack.cpp
Bitboard knight_moves(Bitboard knights) {
    Square_t square = bitscan_forward(knights);
    Bitboard ret = 0;
    for ( ; knights != 0; knights -= C64(1) << square) {
        ret |= KNIGHT_ATTACK_ARRAY[square];
    }
    return ret;
}
/**
 * Computes all pseudo-legal moves of specified knight
 * @param  sq square the knight occupies
 * @param  occupied bitboard of occupied squares
 * @return bitboard of pseudo-legal knight moves
 */
Computes all pseudo-legal moves of specified knight
@param  sq square the knight occupies
@param  occupied bitboard of occupied squares
@return bitboard of pseudo-legal knight moves
Computes all pseudo - legal moves of specified knight @param sq square the knight occupies @param occupied bitboard of occupied squares @return bitboard of pseudo - legal knight moves
Bitboard knight_moves(Bitboard knights) {
    Square_t square = bitscan_forward(knights);
    Bitboard ret = 0;
    for ( ; knights != 0; knights -= C64(1) << square) {
        ret |= KNIGHT_ATTACK_ARRAY[square];
    }
    return ret;
}
Bitboard knight_moves ( Bitboard knights ) { Square_t square = bitscan_forward ( knights ) ; Bitboard ret = 0 ; for ( ; knights != 0 ; knights -= C64 ( 1 ) << square ) { ret |= KNIGHT_ATTACK_ARRAY [ square ] ; } return ret ; }
Computes all pseudo-legal moves of specified knight
 @param  sq square the knight occupies
 @param  occupied bitboard of occupied squares
 @return bitboard of pseudo-legal knight moves
Computes all pseudo - legal moves of specified knight @param sq square the knight occupies @param occupied bitboard of occupied squares @return bitboard of pseudo - legal knight moves