Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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;
            }
        }