public void handToLibrary(final int numToLibrary, final String libPosIn) {
        String libPos = libPosIn;

        for (int i = 0; i < numToLibrary; i++) {
            int position;
            if (libPos.equalsIgnoreCase("Top"))
                position = 0;
            else if (libPos.equalsIgnoreCase("Bottom"))
                position = -1;
            else {
                Random r = MyRandom.random;
                if (r.nextBoolean())
                    position = 0;
                else
                    position = -1;
            }
            CardList hand = AllZoneUtil.getPlayerHand(AllZone.getComputerPlayer());

            CardList blIP = AllZoneUtil.getPlayerCardsInPlay(AllZone.getComputerPlayer());

            blIP = blIP.getType("Basic");
            if (blIP.size() > 5) {
                CardList blIH = hand.getType("Basic");
                if (blIH.size() > 0) {
                    Card card = blIH.get(CardUtil.getRandomIndex(blIH));

                    AllZone.getGameAction().moveToLibrary(card, position);
                } else {
                    CardListUtil.sortAttackLowFirst(hand);
                    CardListUtil.sortNonFlyingFirst(hand);

                    AllZone.getGameAction().moveToLibrary(hand.get(0), position);
                }
            } else {
                CardListUtil.sortCMC(hand);

                AllZone.getGameAction().moveToLibrary(hand.get(0), position);
            }
        }
    }