public void processConfig(ArrayList<String> lines){
        String s;
        // Read the lines and find the link rule and local conditions
        //TODO add support for multiple link rules and local conditions
        for(int i=0;i<lines.size();i++)
        {
            // link rule found
            if(lines.get(i).contains("*link rule"))
            {
                s = lines.get(++i).trim();
                // So far two link rules are supported: same side and opposing side
                if(s.equals("same side"))
                {
                    rules = new int[]{0};
                }
                if(s.equals("opposing side"))
                {
                    rules = new int[]{1};
                }
            }
            // local conditions found
            if(lines.get(i).contains("*local conditions"))
            {
                System.out.println("Found local conditions");
                // an expression evaluator is used to convert the boolean expression
                // into a reversed polish notation to make it easier to check whether
                // the local conditions are met.
                conditionsEvaluator ev = new conditionsEvaluator();
                localconditions = ev.Evaluate(lines.get(++i));
                System.out.println("localconditions now read:");
                for(String str:localconditions)
                {
                    System.out.println(str);
                }
            }
        }
    }