Beispiel #1
0
        public Machine(Settings s) : this()
        {
            _rotors.Clear();

            foreach (var c in s.Rotors)
            {
                Rotor newRotor = new Rotor(c.RotorName);

                newRotor.AlphabetRingPosition = c.AlphabetRingPosition;
                newRotor.NotchRingName        = c.NotchRingName;
                newRotor.NotchRingPosition    = c.NotchRingPosition;

                _rotors.Add(newRotor);
            }
        }
Beispiel #2
0
        public Machine()
        {
            _plate1 = new FixedRotor("Plate1", Wiring.Current.Plate1);
            _plate2 = new FixedRotor("Plate2", Wiring.Current.Plate2);

            for (int i = 0; i < 8; i++)
            {
                Rotor r = new Rotor((RotorName)i);

                r.AlphabetRingPosition = i;
                r.NotchRingName        = (NotchRingName)i;
                r.NotchRingPosition    = i;

                _rotors.Add(r);
            }
        }