Castling can be carried out only when there are no pieces between the king as well as rook you are going to shift. The king and rook can not have moved previously. You can't castle In case your king is in Test or if doing this would transfer your king as a result of or to your square exactly where he might be in Test. Many thanks! We're happy this