Implemented castling.