this partThe parts where you set up the alphabet of each rotor has a lot more boilerplate than it should.
rotor[i] = 'Z';
i++;
... //Rest of letters
rotor[i]
Could be changed to this:
rotor = 'Z';
i++;new char[] { 'Z', \* Rest of letters and such *\ };
You should useIt is basically the array initialization syntax.
rotor = new char[] { ' ', 'A'same idea, ..but it is more readable. };
It actually is there a reason you can't dobetter performance because it this way?eliminates the incrementing of i