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 Nothing(Level2Client client) { Action = () => { client.Move(0); client.Exit(); return null; }; }
public Forward(double distance, Level2Client client) { this.distance = distance; Action = () => client.Move(distance); }