Closed ikleyjl closed 11 years ago
The error seems to be related to the initial rotor setup (and maybe the stepping action). The expected output differs from actual even on the first character, when the only stepping should be the right rotor.
EDIT: The middle and left rotor should step on the first character.
Okay I got it fixed. There were logic errors in Rotor.java and Rotors.java. Also, reflectorChoices[] in RotorsTest.java was missing a 0. Recommend retest and close.
I marked my changes with //Walter Adolph -
Retested. Confirm fix.
Test cases on the three-rotor Enigma designed to trigger all three rotors rotating at once fail. In the TestCasesWithExpectedResults document, the sample for this is the "aaaaamatthew" case, which starts with the rings in the position "AEA". "AEA" will always trigger a triple-rotor turn on the first keystroke. In RotorsTest.java, there is another test case included with the same starting position.The expected results for both of these test cases have been verified against three other Enigma simulators available online.