Example #1
0
 public void addRotor(int n)
 {
     rotor[] a = new rotor[this.rotors.Length + 1];
     for (int i = 0; i < a.Length - 1; i++)
     {
         a[i] = this.rotors[i];
     }
     a[a.Length - 1] = ROTORS[n];
     this.rotors     = a;
 }
Example #2
0
 public int getRotor(rotor r)
 {
     for (int j = 0; j < ROTORS.Length; j++)
     {
         if (r == ROTORS[j])
         {
             return(j);
         }
     }
     return(-1);
 }