public virtual int LeftInput(int val) { if (val < 0) { throw new ArgumentException("Value cannot be lower than zero", nameof(val)); } if (val > 25) { throw new ArgumentException("Value cannot be higher than 25", nameof(val)); } val = RotorBase.Advance(val, this.Position); int result = Array.IndexOf <int>(this.mapping, val); result = RotorBase.Recede(result, this.Position); return(result); }
public override int LeftInput(int val) { if (val < 0) { throw new ArgumentException("Value cannot be lower than zero", nameof(val)); } if (val > 25) { throw new ArgumentException("Value cannot be higher than 25", nameof(val)); } val = RotorBase.Recede(val, this.Offset); int temp = base.LeftInput(val); temp = RotorBase.Advance(temp, this.Offset); return(temp); }
public override int RightInput(int val) { if (val < 0) { throw new ArgumentException("Value cannot be lower than zero", nameof(val)); } if (val > 25) { throw new ArgumentException("Value cannot be higher than 25", nameof(val)); } val = RotorBase.Advance(val, this.Position); int result = base.RightInput(val); result = RotorBase.Recede(result, this.Position); return(result); }