Exemple #1
0
        static void Main(string[] args)
        {
            EnemyTank     tank         = new EnemyTank();
            EnemyRobot    robo         = new EnemyRobot();
            EnemyAttacker robotAdapter = new EnemyRobotAdapter(robo);

            robo.reactToHuman("Me");
            robo.walkForward();

            tank.assignDriver("Frank");
            tank.driveFW();

            robotAdapter.assignDriver("Gaby");
            robotAdapter.driveFW();
        }
 public void assignDriver(string name)
 {
     robot.reactToHuman(name);
 }