* Generates a random shift setting value. * @param {Random} random Random instance * @param {Field} setting Shift setting * @return {string} Randomized plugboard setting value
(random, setting)
| 164 | * @return {string} Randomized plugboard setting value |
| 165 | */ |
| 166 | randomizeShiftValue (random, setting) { |
| 167 | const alphabetSetting = this.getSetting('alphabet') |
| 168 | if (alphabetSetting.isValid()) { |
| 169 | return random.nextInteger(1, alphabetSetting.getValue().getLength() - 1) |
| 170 | } |
| 171 | return null |
| 172 | } |
| 173 | |
| 174 | /** |
| 175 | * Function describing the given shift value in a human-readable way. |
nothing calls this directly
no test coverage detected