static void Main(string[] args) { Drone drone = new Drone("Thomas", "http://127.0.0.1:8000/"); /*drone.Connect(); * drone.Turn(90);*/ /*drone.Forward(2); * drone.Backward(2); * drone.Turn(270); * drone.Turn(190);*/ DroneConnectionProcessor dconp = new DroneConnectionProcessor(drone); DroneProcessor dp = new DroneProcessor(dconp); DroneCommandProcessor dcomp = new DroneCommandProcessor(dp); dcomp.AddCommand(new StartCommand(dp)); dcomp.AddCommand(new StartCommand(dp)); dcomp.AddCommand(new StartCommand(dp)); dcomp.AddCommand(new StartCommand(dp)); dcomp.AddCommand(new StartCommand(dp)); dcomp.AddCommand(new StartCommand(dp)); dcomp.Execute(); Console.Read(); }
public RiseCommand(DroneProcessor processor, double squares) { _processor = processor; _squares = squares; }
public TurnCommand(DroneProcessor processor, int degrees) { _processor = processor; _degrees = degrees; }
public DroneCommandProcessor(DroneProcessor droneProcessor) { this._droneProcessor = droneProcessor; this._commands = new Queue <IDroneCommand>(); }
public ForwardCommand(DroneProcessor processor, double squares) { _processor = processor; _squares = squares; }
public LandCommand(DroneProcessor processor) { _processor = processor; }
public StartCommand(DroneProcessor processor) { _processor = processor; }
public FallCommand(DroneProcessor processor, int squares) { _processor = processor; _squares = squares; }