public static T GetControl<T>() { if(typeof(T) == typeof(GameTimeControl) { return GameTimeControl.Instance(); } // TODO: other singletons return null; }
/// <summary> /// Sets the value of a tag in the format of a <see cref="ResultReason" />. /// </summary> /// <param name="gameTag">The tag.</param> /// <param name="timeControl">The result.</param> public static void SetTimeControlValue(this GameTag gameTag, GameTimeControl timeControl) => gameTag.Value = TimeControlConverters.ToStandardTimeControlString(timeControl);