public void testPlugBoard() { PlugBoard p = new PlugBoard(); p.setPlugs("RS TU VW YZ LX MK JI HG EF QP CD ON AB"); Console.WriteLine(p.swapLetter('R')); Console.WriteLine(p.swapLetter('S')); }
private char encryptLetter(char letter) { char newLetter = plugBoard.swapLetter(letter); newLetter = rotor.encryptLetter(newLetter); newLetter = plugBoard.swapLetter(newLetter); return(newLetter); }