<Tr> <Td> </Td> <Td> </Td> </Tr> <Tr> <Td> </Td> <Td> </Td> <Td> </Td> <Td> </Td> <Td> d </Td> <Td> </Td> <Td> f </Td> <Td> g </Td> <Td> h </Td> <Td> </Td> </Tr> <P> A king can move one square in any direction (horizontally, vertically, or diagonally) unless the square is already occupied by a friendly piece or the move would place the king in check . As a result, the opposing kings may never occupy adjacent squares (see opposition), but the king can give discovered check by unmasking a bishop, rook, or queen . The king is also involved in the special move of castling . </P> <P> In conjunction with a rook, the king may make a special move called castling, in which the king moves two squares toward one of its rooks and then the rook is placed on the square over which the king crossed . Castling is allowed only when neither the king nor the castling rook has previously moved, no squares between them are occupied, the king is not in check, and the king will not move across or end its movement on a square that is under enemy attack . </P>

What direction can the king move in chess