Esempio n. 1
0
        static void Main(string[] args)
        {
            City city1 = new City();

            Citizen p1      = new Citizen("John Snow");
            Police  police1 = new Police("Not Batman");
            Vampire v1      = new Vampire("Draccula");
            Citizen p2      = new Citizen("Van Helsing");

            city1.addResident(p1);
            city1.addResident(p2);
            city1.addResident(police1);
            city1.addResident(v1);

            string tourAgain;



            do
            {
                city1.tourResidents();
                Console.WriteLine("Do you want to tour again? (y/n)");
                tourAgain = Console.ReadLine();
            } while (tourAgain == "y" || tourAgain == "Y");
        }
Esempio n. 2
0
        public override Person speak()
        {
            Console.WriteLine("Ssssssss! <Bite!> <Bite!> <Bite!>");
            Console.WriteLine("You've been bitten by a vampire and now are a cursed undead.");
            Console.Write("What was your name in life, former mortal? : ");
            string name;

            name = Console.ReadLine();

            Vampire spawn = new Vampire(name);

            return(spawn);
        }