public static void testSolver(Solver solver, int max, HashMap<Integer, HashMap<Integer,Integer>> correct){
        TiliaCollection collection = new TiliaCollection(max,42);
        boolean isCorrectSolution = true;

        for(int i = 1; i <= max; i++){
            Tilia test = collection.getGrid(i);
            CuttingResult solution = solver.getReward(test);
        
          
            HashMap<Integer,Integer> map = new HashMap<Integer,Integer>();
       
            for (int x: solution.getPieces()){
                if (map.containsKey(x)){
                    map.put(x, map.get(x)+1);
                }else{
                    map.put(x, 1);
                }
            }
            //System.out.println("correct.put("+i+",new HashMap<Integer, Integer>());");
           for (int x: map.keySet()){
                isCorrectSolution =  isCorrectSolution && (correct.get(i).get(x) == map.get(x));
                //System.out.println("correct.get("+i+").put("+x+","+map.get(x)+");");
            }
        }
        System.out.println("Correct solver for these cases? "+isCorrectSolution);
    
    }