示例#1
0
        private static int CalculateValue(CardName name)
        {
            string nameToString = name.GetString();
            int    value;
            bool   results = int.TryParse(nameToString, out value);

            if (results)
            {
                return(value);
            }
            else if (name == CardName.Ace)
            {
                return(11);
            }
            return(10);
        }