Esempio n. 1
0
 public EnigmaMachine()
 {
     _plugboard   = new Plugboard();
     _fastRotor   = new RotorSocket(Rotor.Create(RotorVariation.FirstTypeRotor));
     _middleRotor = new RotorSocket(Rotor.Create(RotorVariation.SecondTypeRotor));
     _slowRotor   = new RotorSocket(Rotor.Create(RotorVariation.ThirdTypeRotor));
     _reflector   = new RotorSocket(Reflector.Create(ReflectorVariation.FirstTypeReflector));
 }
Esempio n. 2
0
        public MachineRun(string m, Rotor m4, Rotor lR, Rotor mR, Rotor rR, string ern, string[] indPlugs)
        {
            // constructor for Enigma M4 - navy
            this.mType = true; // = navy enigma

            this.pBoard  = new PlugBoard(indPlugs);
            this.mirror  = new Mirror(m);
            this.M4Rotor = m4;
            this.lRotor  = lR;
            this.mRotor  = mR;
            this.rRotor  = rR;
            this.eRotor  = new EntryRotor(ern);
        }
Esempio n. 3
0
        public MachineRun(string m, Rotor lR, Rotor mR, Rotor rR, string ern, string[] indPlugs)
        {
            // constructor for Enigma I - army / M1
            this.mType = false; // = army enigma

            this.pBoard = new PlugBoard(indPlugs);
            this.mirror = new Mirror(m);
            this.lRotor = lR;
            this.mRotor = mR;
            this.rRotor = rR;
            this.eRotor = new EntryRotor(ern);
            //Console.WriteLine(lR.GetN()+":"+mR.GetN()+":"+rR.GetN()+"|"+lR.GetCpos()+"."+mR.GetCpos()+"."+rR.GetCpos()+"|"+lR.GetsRing()+"."+mR.GetsRing()+"."+rR.GetsRing());
        }