Example #1
0
        // function that executing the translation of a character
        public char RunEnigma(char input)
        {
            Didnotch(Rotor1);


            input = Plugboard.getPlug(input);

            input = Rotor1.translate(input);

            input = Rotor2.translate(input);

            input = Rotor3.translate(input);

            input = Reflector.GetReflector(input);

            input = Rotor3.translateRev(input);

            input = Rotor2.translateRev(input);

            input = Rotor1.translateRev(input);

            input = Plugboard.getPlug(input);


            return(input);
        }