# Path: oscar/agent/custom_agent.py
# class CustomAgent(BaseAgent):
#     """A base agent to write custom scripted agents."""
# 
#     def __init__(self):
#         super().__init__()
#         self._shared = {}
# 
#     def add_shared(self, name, shared):
#         self._shared[name] = shared


from oscar.agent.custom_agent import CustomAgent
from oscar.meta_action import *
        super().__init__()

    def set_supply_depot_built(self):
        print("supply depot built")
        self.supply_depot_built = True

    def set_barracks_built(self):
        print("barracks built")
        self.barracks_built = True

    def step(self, obs, locked_choice=None):
        play = {}

        if not self.supply_depot_built:
            meta_action = None
            try:
                meta_action = build(obs, 2, BUILD_SUPPLY_DEPOT)
                if meta_action:
                    play["success_callback"] = self.set_supply_depot_built
            except NoValidSCVError:
                print("supply depot build failed")
                meta_action = [actions.FunctionCall(NO_OP, [])]

            play["actions"] = meta_action
            return play

        if not self.barracks_built:
            meta_action = None
            try:
                meta_action = build(obs, 3, BUILD_BARRACKS)

# Path: oscar/agent/custom_agent.py
# class CustomAgent(BaseAgent):
#     """A base agent to write custom scripted agents."""
# 
#     def __init__(self):
#         super().__init__()
#         self._shared = {}
# 
#     def add_shared(self, name, shared):
#         self._shared[name] = shared


# Path: oscar/agent/scripted/economic.py
from oscar.agent.custom_agent import CustomAgent
from oscar.meta_action import *

        super().__init__()

    def set_supply_depot_built(self):
        print("supply depot built")
        self.supply_depot_built = True

    def set_barracks_built(self):
        print("barracks built")
        self.barracks_built = True

    def step(self, obs, locked_choice=None):
        play = {}

        if not self.supply_depot_built:
            meta_action = None
            try:
                meta_action = build(obs, 2, BUILD_SUPPLY_DEPOT)
                if meta_action:
                    play["success_callback"] = self.set_supply_depot_built
            except NoValidSCVError:
                print("supply depot build failed")
                meta_action = [actions.FunctionCall(NO_OP, [])]

            play["actions"] = meta_action
            return play

        if not self.barracks_built:
            meta_action = None
            try:
                meta_action = build(obs, 3, BUILD_BARRACKS)

                if meta_action: