Esempio n. 1
0
        static void Main(string[] args)
        {
            Player  player  = new Player();
            Footman footman = new Footman();

            player.SelectedUnitAttack(footman);

            Peasant        peasant = new Peasant();
            PeasantAdapter adapter = new PeasantAdapter(peasant);

            player.SelectedUnitAttack(adapter);

            Console.ReadKey();
        }
Esempio n. 2
0
 public PeasantAdapter(Peasant peasant)
 {
     _peasant = peasant;
 }