Example #1
0
 public void PrintDroids()
 {
     foreach (var item in _droids)
     {
         adapter = new HumanoidAdapter(item);
         HumanTranslatePrinter.HumanInfoPrint(adapter);
     }
 }
Example #2
0
        static void Main(string[] args)
        {
            IDroid          _droids = new C3PO();
            HumanoidAdapter adapter = new HumanoidAdapter(_droids);

            HumanTranslatePrinter.HumanInfoPrint(adapter);
            Console.ReadLine();
            Humanian home = Humanian.Inizialize();

            home.AddUnit("Файвз", "Рядовой");
            home.PrintUnit();
            Humanian home2 = Humanian.Inizialize();

            home2.PrintUnit();
            Console.WriteLine(home.GetHashCode());
            Console.WriteLine(home2.GetHashCode());
            Droidistic droids = new Droidistic();

            droids.AddDroids();
            droids.PrintDroids();
            Console.ReadLine();
        }