// Returns true if the letter string starts with the letter. public bool StartsWith(Letter letter) { if (letters.Count >= 1) return letters[0] == letter; return false; }
// Inserts a letter into the letter string. public void Insert(int index, Letter letter) { letters.Insert(index, letter); }
// Adds a letter to the letter string. public void Add(Letter letter) { letters.Add(letter); }
// Returns true if the letter string ends with the letter. public bool EndsWith(Letter letter) { if (letters.Count >= 1) return letters[letters.Count - 1] == letter; return false; }
// Constructs a copy of the letter string. public LetterString(Letter letter) { this.letters = new List<Letter>(); this.letters.Add(letter); }