import jade.Boot;

import java.io.File;
import java.util.ArrayList;

public class Main {
    public static void main(String[] args) {
        File folder = new File("src/agents");
        ArrayList<String> argList = new ArrayList<>();
        Integer whichOne = 0;

        argList.add("-gui");

        for (File file : folder.listFiles()) {
            String fileName = file.getName();
            if (fileName.endsWith(".java")) {
                argList.add("agent" + whichOne.toString() + ":" + fileName.split("\\.")[0]);
            }
        }


        String[] jadeArgs = argList.toArray(new String[0]);
        Boot.main(jadeArgs);
    }
} 
// FIX THE AGENT NOT LAUCHING for some reason