castling needs to be before move