public boolean equals(Object a) {
        if (a instanceof CardList) {
            CardList b = (CardList) a;
            if (list.size() != b.size()) return false;

            for (int i = 0; i < list.size(); i++)
                if (!list.get(i).equals(b.get(i))) return false;

            return true;
        } else return false;
    }