?

Log in

No account? Create an account

Previous Web | Next Web

95

Oh well... an hour was a little bit of an under-estimate for the amount of time, but...

<fx: fanfare>

The Rotor class, RotorN class (for rotors 1, 2 and 3) and the RotorCore class are now all ready to test... :-)

Which basically means that I need to put together some stuff in the current enclosing class, EnigmaMachine, that will trigger the various methods in Rotor... and output the results so I can see whether they make sense.

Not sure if this will work 100%, it might look odd... depends how well the line-drawing characters are encoded, but...

Enigma Simulator v0.0
=====================
This is a test utility for inner class: Rotor

Creating rotors: [ I  II  III ]

User Initialisation
-------------------
Input required, format: mm,nn,oo
Stellung settings: 1,17,26
Input required, format: mm,nn,oo
Rotor positions: 21,13,4

User configuration of the Enigma Machine is complete.

Configuration Details
=====================

Rotor: I   Carry: 18  Stellung: 1   Actual: 19    Position: 21
╔═ Rotor  Wiring ═════════════════════════════════════════════════════════════╗
║ 1│ 2│ 3│ 4│ 5│ 6│ 7│ 8│ 9│10│11│12│13│14│15│16│17│18│19│20│21│22│23│24│25│26║
║──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──║
║ 5│11│13│ 6│12│ 7│ 4│17│22│26│14│20│15│23│25│ 8│24│21│19│16│ 1│ 9│ 2│18│ 3│10║
╚═════════════════════════════════════════════════════════════════════════════╝

Rotor: II   Carry: 6   Stellung: 17  Actual: 23    Position: 13
╔═ Rotor  Wiring ═════════════════════════════════════════════════════════════╗
║ 1│ 2│ 3│ 4│ 5│ 6│ 7│ 8│ 9│10│11│12│13│14│15│16│17│18│19│20│21│22│23│24│25│26║
║──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──║
║ 1│10│ 4│11│19│ 9│18│21│24│ 2│12│ 8│23│20│13│ 3│17│ 7│26│14│16│25│ 6│22│15│ 5║
╚═════════════════════════════════════════════════════════════════════════════╝

Rotor: III   Carry: 23  Stellung: 26  Actual: 23    Position: 4
╔═ Rotor  Wiring ═════════════════════════════════════════════════════════════╗
║ 1│ 2│ 3│ 4│ 5│ 6│ 7│ 8│ 9│10│11│12│13│14│15│16│17│18│19│20│21│22│23│24│25│26║
║──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──┼──║
║ 2│ 4│ 6│ 8│10│12│ 3│16│18│20│24│22│26│14│25│ 5│ 9│23│ 7│ 1│11│13│21│19│17│15║
╚═════════════════════════════════════════════════════════════════════════════╝