public void addCard(ViewableCard card) {
        /* Add a non-basic land card in a proper lixicographical position
         * or before the first found basic land. Basic lands are always added
         * at the end.
         */
        boolean done = false;
        if (!Card.isBasicLand(card.getCardName())) {
            for (int i = 0; i < cards.size(); i++) {
                if (card.compareTo(cards.get(i)) <= 0
                        || Card.isBasicLand(cards.get(i).getCardName())) {
                    cards.add(i, card);
                    panel.add(card, i);
                    done = true;
                    break;
                }
            }
        } else {
            return; //do not add basic land
        }
        if (!done) {
            cards.add(card);
            panel.add(card);
        }

        card.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                ViewableCard source = (ViewableCard) e.getSource();
                if (e.getButton() == MouseEvent.BUTTON1
                        && parent.deck.removeCard(source.getCardName(), 1)) {
                    removeCard(source);
                    parent.stats.modifyCard(source.getCardName(), -1);
                }
            }
        });
        panel.setPreferredSize(new Dimension(Card.W * cards.size(), Card.H));
        panel.validate();
        panel.repaint();
        this.validate();
        this.repaint();
    }