Beispiel #1
0
        static void Main(string[] args)
        {
            Walk  walk  = new Walk();
            Human human = new Human("Илья");

            walk.Travel(human);
            Shark    shark          = new Shark();
            IMovment sharktransport = new SharkToHumanAdapter(shark);

            walk.Travel(sharktransport);
            Human human1 = new YoungHuman(human);

            walk.Travel(human1);
            Map map = new Map();

            human.Title  = "LOL";
            human1.Title = "RUKA";
            map.AddComponent(human);
            map.AddComponent(human1);
            map.Find("LOL");
            human.Find("LOL");

            Console.Read();
        }
Beispiel #2
0
 public SharkToHumanAdapter(Shark c)
 {
     shark = c;
 }