private void getMax(int l, HashMap<SpaceShip, List<Action>> actions) {
        maxVal = -10e10;
        if (l == 0) {
            maxMas = new Action[player.getShips().size()];
            ind = new Action[player.getShips().size()];
        }
        if (l == player.getShips().size()) {
            ArrayList<Action> a = new ArrayList<Action>();
            for (int i = 0; i < player.getShips().size(); i++) {
                a.add(ind[i]);
            }
            if (EvaluationFunctions.MR(universe, player, a) > maxVal) {
                for (int i = 0; i < player.getShips().size(); i++)
                    maxMas[i] = ind[i];
                maxVal = EvaluationFunctions.MR(universe, player,  a);
            }
        } else {
            SpaceShip ship = null;
            int i = 0;
            for (SpaceShip s: actions.keySet()) {
                if (i == l) {
                    ship = s;
                    break;
                }
                i++;
            }
            for (Action a: actions.get(ship)) {
                ind[l] = a;
                getMax(l + 1, actions);
            }
        }
    }