Join the function threatenedSquares of Knight and King in one