def create_runner(): r = Robot(SensorMap(sensor_map_master), bluetooth=BluetoothMaster(MAC_ADDRESS, PORT)) mission_Mission = Mission([ BorderAction(priority=5), ColorDetAction(colors=[ColorSensor.COLOR_RED], priority=4), DontDrownAction(lakes=[ ColorSensor.COLOR_RED, ColorSensor.COLOR_YELLOW, ColorSensor.COLOR_BLUE ], priority=3), UltrasoundAction(rotate_degrees=0.5, dodge_rocks=False, priority=2), DriveAction(priority=1) ]) mission_Mission2 = Mission([ BorderAction(priority=5), ColorDetAction(colors=[ColorSensor.COLOR_RED], priority=4), DontDrownAction( lakes=[ColorSensor.COLOR_RED, ColorSensor.COLOR_YELLOW], priority=3), UltrasoundAction(rotate_degrees=0.5, dodge_rocks=False, priority=2), DriveAction(priority=1) ]) Runner(r, [mission_Mission, mission_Mission2]).run()
def create_runner(): r = Robot(SensorMap(sensor_map_master), bluetooth=BluetoothMaster(MAC_ADDRESS, PORT)) mission_Name24 = Mission([ BorderAction(rotate_degrees=0.3, priority=4), ColorDetAction(colors=[ColorSensor.COLOR_RED], priority=3), DontDrownAction(lakes=[ ColorSensor.COLOR_RED, ColorSensor.COLOR_YELLOW, ColorSensor.COLOR_BLUE ], priority=2), DriveAction(speed=3, priority=1) ], SpeakCelebration('weeeeeeeeeeeeeeeeeee')) mission_Name52 = Mission([ BorderAction(priority=4), DontDrownAction(lakes=[ ColorSensor.COLOR_RED, ColorSensor.COLOR_YELLOW, ColorSensor.COLOR_BLUE ], priority=3), PushRockAction(number_of_rocks=1, priority=2), DriveAction(speed=3, priority=1) ], DanceCelebration()) Runner(r, [mission_Name24, mission_Name52]).run()
def create_runner(): r = Robot(SensorMap(sensor_map_master), bluetooth=BluetoothMaster(MAC_ADDRESS, PORT)) mission_Mission = Mission([BorderAction(priority=2), ColorDetAction(colors=[ColorSensor.COLOR_RED], priority=0), DontDrownAction(lakes=[ColorSensor.COLOR_RED, ColorSensor.COLOR_YELLOW, ColorSensor.COLOR_BLUE], priority=1), DriveAction(priority=0)]) Runner(r, [mission_Mission]).run()