コード例 #1
0
        /// <summary>
        /// Logs all information about the variables.
        /// </summary>
        private static void Log()
        {
            Debug.LogWarningFormat("Log method initalized. Dumping all variables... Make sure that you only receive at most 430 warnings! (Press the warning icon in the top-right part of the console to hide this logging!)");

            for (int i = 0; i < ValidWords.Length; i++)
            {
                Debug.LogWarningFormat("{0}: {1}.", i, ValidWords[i].Join(", "));
            }

            Debug.LogWarningFormat("Valid alphabet: {0}.", ValidAlphabet.Join(", "));
            Debug.LogWarningFormat("Valid character sequence: {0}.", ValidChars.Join(", "));

            Debug.LogWarningFormat("The shortest words are: {0}.", GetShortest().Join(", "));
            Debug.LogWarningFormat("The longest words are: {0}.", GetLongest().Join(", "));

            Debug.LogWarningFormat("The smallest length of a given index is: {0}", GetShortestLength());
            Debug.LogWarningFormat("The longest length of a given index is: {0}", GetLongestLength());

            Debug.LogWarningFormat("The indexes that don't meet the required {0} length are: {1}", MinAcceptableWordSet, ValidWords.Where(a => a.Length < MinAcceptableWordSet).Select(a => Array.IndexOf(ValidWords, a)).Join(", "));

            Debug.LogWarningFormat("The amount of distinct to total words are: {0}/{1}.", GetCount(distinct: true), GetCount(distinct: false));
            Debug.LogWarningFormat("The words that are completely unique are: {0}.", ValidDistinctWords.GroupBy(x => x).Where(g => g.Count() == 1).Select(y => y.Key).Join(", "));
        }