internal void Meet(Reindeer reindeer) { lock (ReindeerGroup) { ReindeerGroup.Add(reindeer); if (ReindeerGroup.Count == 9) { var awakeMessage = new ReindeerAwakeMessage(ReindeerGroup.ToList()); foreach (var reindeerToRemove in awakeMessage.Group) { ReindeerGroup.Remove(reindeerToRemove); } Santa.Awake(awakeMessage); } } }
public void Tie(Reindeer reindeer) { Reindeers.Add(reindeer); reindeer.Sleigh = this; }