Card[] smoothComputerManaCurve(Card[] in) {
        CardList library = new CardList(in);
        library.shuffle();

        //remove all land, keep non-basicland in there, shuffled
        CardList land = library.getType("Land");
        for (int i = 0; i < land.size(); i++)
            if (land.get(i).isLand()) library.remove(land.get(i));

        //non-basic lands are removed, because the computer doesn't seem to
        //effectively use them very well
        land = threadLand(land);

        try {
            //mana weave, total of 7 land
            //  The Following have all been reduced by 1, to account for the computer starting first.
            library.add(6, land.get(0));
            library.add(7, land.get(1));
            library.add(8, land.get(2));
            library.add(9, land.get(3));
            library.add(10, land.get(4));

            library.add(12, land.get(5));
            library.add(15, land.get(6));
        } catch (IndexOutOfBoundsException e) {
            System.err.println("Error: cannot smooth mana curve, not enough land");
            return in;
        }

        //add the rest of land to the end of the deck
        for (int i = 0; i < land.size(); i++)
            if (!library.contains(land.get(i))) library.add(land.get(i));


        //check
        for (int i = 0; i < library.size(); i++)
            System.out.println(library.get(i));


        return library.toArray();
    }//smoothComputerManaCurve()