public bool DropInvention(Invention pInvention) { if (!Inventions.Contains(pInvention)) { Console.WriteLine("You haven't got this invention! Cheater?"); return(false); } Inventions.Remove(pInvention); Console.WriteLine($"{Name} изобрёл [{pInvention.ID}]{pInvention.Name}"); return(true); }
public void CheckAnswer() { var selectedInventor = Inventors.First(i => i.Id == SelectedInventor); if (selectedInventor.Invention == SelectedInvention) { Inventors.Remove(selectedInventor); Inventions.Remove(selectedInventor.Invention); SelectedInventor = null; SelectedInvention = null; Points++; } else { Points = Points - 2; } }