public bool AddSurvivorToGame(Survivor newSurvivor) { var retVal = false; var newSurvivorName = newSurvivor.Name; if (!Survivors.Any(s => s.Name.Equals(newSurvivorName))) { newSurvivor.Notifier = _notifier; Survivors.Add(newSurvivor); Notify($"Survivor {newSurvivor.Name} was added to the game"); retVal = true; } return(retVal); }
public void AddSurvivor(Survivor survivor) { if (Players.Count == 0) { Players.Add(survivor); } else { for (var i = Players.Count - 1; i >= 0; i--) { if (Players[i].Name != survivor.Name) { Players.Add(survivor); } } } }