Beispiel #1
0
        private LetterList(LetterList other) : base(new List <LetterTile>())
        {
            if (other is null)
            {
                throw new ArgumentNullException(nameof(other));
            }

            foreach (LetterTile tile in other.Items)
            {
                Items.Add(tile.DeepClone());
            }
        }
Beispiel #2
0
        public void ResetTo(LetterList toThis)
        {
            if (toThis is null)
            {
                throw new ArgumentNullException(nameof(toThis));
            }

            if (Count != toThis.Count)
            {
                throw new ArgumentOutOfRangeException(nameof(toThis));
            }

            for (int index = 0; index < Count; index++)
            {
                this[index].Frequency = toThis[index].Frequency;
            }
        }