* Checks if given rotor has a turnover at given position. * @protected * @param {object} rotor Rotor entry * @param {number} position Rotor position * @return {boolean} True, if rotor has a turnover at given position
(rotor, position)
| 756 | * @return {boolean} True, if rotor has a turnover at given position |
| 757 | */ |
| 758 | static rotorAtTurnover (rotor, position) { |
| 759 | if (rotor.turnovers === undefined) { |
| 760 | return false |
| 761 | } |
| 762 | const positionChar = String.fromCharCode(97 + MathUtil.mod(position, 26)) |
| 763 | return rotor.turnovers.indexOf(positionChar) !== -1 |
| 764 | } |
| 765 | |
| 766 | /** |
| 767 | * Wires character index (0-25) through given rotor at given position. |
no test coverage detected