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(); }
public SharkToHumanAdapter(Shark c) { shark = c; }