Understanding the Enigma machine from “The Imitation Game” with 30 Lines of Ruby 11 years ago
That property is caused by the reflector, rotors themselves can shuffle randomly. The way the reflector is built in the implementation is from pairs of consecutive (unique) letters of the shuffled alphabet (getting a half of the reflector) and then merging the inversion.
IMHO it's correct.