private void init(String xmlFileName) 
    {
        if(xmlFileName == null)
            throw new NullPointerException("xml file name is null");
        
        generated.Monopoly XMLgame = MonopolyUtils.createObjectFromXml(xmlFileName);
        
        if (XMLgame == null) 
            throw new NullPointerException("XMLgame is null");
        

        _surprise = new ActionSquare(ActionSquare.SURPRISE, this);
        _warrant = new ActionSquare(ActionSquare.WARRANT, this);

        // init countries
        try 
        {
            int numCountries = XMLgame.getCountries().getSize();

            for (int i = 0; i < numCountries; i++) 
            {
                generated.Country XMLcountry = XMLgame.getCountries().getCountry().get(i);
                Country myCountry = new Country(this);
                myCountry.init(XMLcountry);
                _countries.add(myCountry);
            }
        } 
        catch (RuntimeException e) 
        {
            System.out.println("error: theres a problem with the countries format in the xml file");
            e.printStackTrace();
        }

        // init utils and transportation
        try 
        {
            for (int i = 0; i < NUM_SIMPLE_ASSETS; i++) 
            {
                int type = XMLgame.getSimpleAssetGroups().getGroup().get(i).getType().ordinal();
                generated.Group XMLassetGroup = XMLgame.getSimpleAssetGroups().getGroup().get(i);
                
                if (type == UTILS) 
                {
                    _utils.init(XMLassetGroup);
                } 
                else if (type == TRANSPORTATION) 
                {
                    _tranportation.init(XMLassetGroup);
                }
            }
        } 
        catch (RuntimeException e) 
        {
            System.out.println("error: theres a problem with the utils or tranportation format in the xml file");
            e.printStackTrace();
        }

        // init cards
        try 
        {
            generated.Cards XMLcards = XMLgame.getCards();
            _surprise.init(XMLcards);
            _warrant.init(XMLcards);
        } 
        catch (RuntimeException e) 
        {
            System.out.println("error: theres a problem with cards format in the xml file");
            e.printStackTrace();
        }

        this.initBoard();
    }