예제 #1
0
        static void Main(string[] args)
        {
            RobotRescue     robotRescue     = new RobotRescue();
            RobotCarPainter robotCarPainter = new RobotCarPainter();
            RobotFenceFixer robotFenceFixer = new RobotFenceFixer();
            RobotCooker     robotCooker     = new RobotCooker();

            Invocker robotRescueInvocker = new ARobotCarPainter();

            robotRescueInvocker.SetCommand(new BackUpList(new List <ICommand> {
                new CarGiveToUser(robotCarPainter, 3), new CarPutInOven(robotCarPainter, 1), new CookRareBurger(robotCooker, 4)
            }));
            robotRescueInvocker.ExecuteCommand();
        }
 public FencesRestMode(RobotFenceFixer robotCarPainter, int weight)
 {
     _robotCarPainter = robotCarPainter;
     _taskWeight      = weight;
 }
 public FenceVeryWellFix(RobotFenceFixer robotCarPainter, int weight)
 {
     _robotCarPainter = robotCarPainter;
     _taskWeight      = weight;
 }