static void Main() { EnemyTank tx3Tank = new EnemyTank(); EnemyRobot amyTheRobot = new EnemyRobot(); EnemyAttacker robotAdapter = new EnemyRobotAdapter(amyTheRobot); Write("The Robot:"); amyTheRobot.ReactToHuman("Bishnu"); amyTheRobot.WalkForward(); amyTheRobot.SmashWitHands(); Write("The Enemy Tank"); tx3Tank.AssignDriver("Bishnu"); tx3Tank.DriveForward(); tx3Tank.FireWeapon(); Write("The Robot with Adapter"); robotAdapter.AssignDriver("Samir"); robotAdapter.DriveForward(); robotAdapter.FireWeapon(); }
public void FireWeapon() { theRobot.SmashWitHands(); }