static void Control(int port) { var client = new Level2Client(); client.SensorDataReceived += sensorData => form.ShowMap(sensorData.Map); client.Configurate(port, true, RoboMoviesBots.Stand); client.Rotate(-90); client.Move(100); client.Rotate(90); client.Move(110); for (int i = 0; i < 10; i++) { client.Rotate(10); } client.Exit(); }
public Rotate(double angle, Level2Client client) { this.angle = angle; Action = () => client.Rotate(angle); }