private List<Letter> AddAllLetters() { var allLetters = new List<Letter>(); Letter example = new Letter(); for (int i = 0; i < ALLLEFTERSIZE; i++) { Letter currLetter = (Letter)example.Clone(); currLetter.Sign = Convert.ToChar(currLetter.Sign + 1); allLetters.Add(currLetter); } return allLetters; }
public static void ReturnRand() { int Cnt = Words.Length; Random rnd = new Random(); string Chosen = Words[rnd.Next(0, Cnt)]; Cnt = Chosen.Length; Letters = new Letter[Cnt]; for (int i = 0; i < Cnt; i++) { Letters[i] = new Letter(); Letters[i].l_Let = Char.ToLower(Chosen[i]); Letters[i].l_Vis = false; } Letters[0].l_Vis = Letters[Cnt - 1].l_Vis = true; }