示例#1
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);
        }
示例#2
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());
        }