public void undo(CardPanel panel) {
        System.out.println(history);
        if (!history.isEmpty()) {
            CardMove toUndo = history.peek();
            if (toUndo.undo(this, panel)) {
                history.pop();
            }
        }


    }