示例#1
0
        /// <summary>
        /// Convert a string to a TimeControl object.
        /// </summary>
        /// <param name="timeControlString">The time control string.</param>
        /// <returns>The time control object.</returns>
        public static GameTimeControl TimeControlFromTimeControlString(string timeControlString)
        {
            var standardParts = TimeControl
                                .parseTimeControl(timeControlString)
                                .Select(DescriptorToTimeControlPart)
                                .ToList();

            return(new GameTimeControl()
            {
                TimeControlParts = standardParts,
            });
        }