コード例 #1
0
ファイル: Algorithm.cs プロジェクト: AndrePu/Rewriter
        /// <summary>
        /// Swaps Values by their indeces in List DS
        /// </summary>
        ///
        private static void IndexSwap(List <CorrectWord> list, int ind1, int ind2)
        {
            CorrectWord temp = list[ind1];

            list[ind1] = list[ind2];
            list[ind2] = temp;
        }
コード例 #2
0
 public LingoWord(string word)
 {
     if (word.Length != 5)
     {
         throw new ArgumentException("This Lingo board only supports 5 letter words");
     }
     word = word.ToLowerInvariant();
     foreach (char character in word)
     {
         CorrectWord.Add(new LingoLetter(character));
     }
 }