/// <summary> /// Creates a new <see cref="ControlSettings"/> object that is a copy of the current instance. /// </summary> /// <returns>A new <see cref="ControlSettings"/> object that is a copy of this instance.</returns> public ControlSettings Clone() { return(new ControlSettings { LeftPaddle = LeftPaddle != null?LeftPaddle.Clone() : null, RightPaddle = RightPaddle != null?RightPaddle.Clone() : null }); }
/// <summary> /// Serves as the default hash function. /// </summary> /// <returns> /// A hash code for the current object. /// </returns> public override int GetHashCode() { unchecked { return(((LeftPaddle != null ? LeftPaddle.GetHashCode() : 0) * 397) ^ (RightPaddle != null ? RightPaddle.GetHashCode() : 0)); } }