#!/usr/bin/env python3
from src.action.colorFinder import ColorFinder
from src.avoider.colorAvoider import ColorAvoider
from src.bt.bluethooth import Bluetooth
from src.color import Color
from src.drive.speed import Speed
from src.base.task import Task

def run():
    for m in missions:
        m.execute()


missions = []

task_Task1 = Task()
task_Task1.set_action(ColorFinder(Color.GREEN, Speed.SLOW)
)

task_Task1.add_avoider(ColorAvoider(Color.RED, [DriveAction(Speed.NORMAL,10, 0),
DriveAction(Speed.NORMAL, 0,3),
DriveAction(Speed.NORMAL,100, 0)
])
)

print("Starting brick 1")
print("Connecting as Client...")

b = Bluetooth()
b.connect_as_client()

run()
