Generates all pseudo-legal moves for a king, including castling.
Generates all pseudo-legal king moves from the given square, including castling moves.