public void init(generated.Cards XMLcards) 
    {
        if (XMLcards == null) 
            throw new NullPointerException("XMLcards is null");

        // init "go to" cards
        generated.Gotos XMLgotos;

        if (_type == SURPRISE) 
        {
            XMLgotos = XMLcards.getSurprises().getGotos();
        } 
        else // WARRANT
        {
            XMLgotos = XMLcards.getWarrants().getGotos();
        }

        int gotoSize = XMLgotos.getSize();

        for (int i = 0; i < gotoSize; i++) 
        {
            generated.Goto XMLgotoCard = XMLgotos.getGoto().get(i);
            GotoCard myGotoCard = new GotoCard(_type, _game);
            myGotoCard.init(XMLgotoCard);
            this.addCard(myGotoCard);
        }

        // init "finance" cards
        generated.Finances XMLfinances;
        if (_type == SURPRISE) 
        {
            XMLfinances = XMLcards.getSurprises().getFinances();
        } 
        else // WARRANT
        {
            XMLfinances = XMLcards.getWarrants().getFinances();
        }

        int financesSize = XMLfinances.getSize();

        for (int i = 0; i < financesSize; i++) 
        {
            generated.Finance XMLfinanceCard = XMLfinances.getFinance().get(i);
            FinancialCard myFinanceCard = new FinancialCard(_type, _game);
            myFinanceCard.init(XMLfinanceCard);
            this.addCard(myFinanceCard);
        }

        // init "pardon" cards
        if (_type == SURPRISE) 
        {
            generated.Pardons XMLpardons = XMLcards.getSurprises().getPardons();
            int pardonSize = XMLpardons.getSize();
            
            for (int i = 0; i < pardonSize; i++) 
            {
                generated.Pardon XMLpardonCard = XMLpardons.getPardon().get(i);
                PardonCard myPardonCard = new PardonCard(this);
                myPardonCard.init(XMLpardonCard);
                this.addCard(myPardonCard);
            }
        }

        this.mixCards();
    }