*/
    public int checkForDeath() {
        final Specification spec = getGame().getSpecification();
        /*
         * Die if: (isNative && (no colonies or units))
         *      || ((rebel or independent) && !(has coastal colony))
         *      || (isREF && !(rebel nation left) && (all units in Europe))
         *      || ((no units in New World)
         *         && ((year > 1600) || (cannot get a unit from Europe)))
         */
        switch (getPlayerType()) {
        case NATIVE: // All natives units are viable
            return (getUnits().isEmpty()) ? IS_DEAD : IS_ALIVE;

        case COLONIAL: // Handle the hard case below
            if (isUnknownEnemy()) return IS_ALIVE;
            break;

        case REBEL: case INDEPENDENT:
            // Post-declaration European player needs a coastal colony
            // and can not hope for resupply from Europe.
            for (Colony colony : getColonies()) {
                if (colony.isConnectedPort()) return IS_ALIVE;
            }
            return IS_DEAD;

        case ROYAL:
            return (getRebels().isEmpty()) ? IS_DEAD : IS_ALIVE;

        case UNDEAD:
            return (getUnits().isEmpty()) ? IS_DEAD : IS_ALIVE;

        default:
            throw new IllegalStateException("Bogus player type");
        }

        // Quick check for a colony.  Do not log, this is the common case.
        if (!getColonies().isEmpty()) return IS_ALIVE;

        // Traverse player units, look for valid carriers, colonists,
        // carriers with units, carriers with goods.
        boolean hasCarrier = false, hasColonist = false, hasEmbarked = false,
            hasGoods = false;
        for (Unit unit : getUnits()) {
            if (unit.isCarrier()) {
                if (unit.hasGoodsCargo()) hasGoods = true;
                hasCarrier = true;
                continue;
            }

            // Must be able to found new colony or capture units
            if (!unit.isColonist() && !unit.isOffensiveUnit()) continue;
            hasColonist = true;

            // Verify if unit is in new world, or on a carrier in new world
            Unit carrier;
            if ((carrier = unit.getCarrier()) != null) {
                if (carrier.getTile() != null) {
                    logger.info(getName() + " alive, unit (embarked) on map.");
                    return IS_ALIVE;
                }
                hasEmbarked = true;
            }
            if (unit.getTile() != null) {
                logger.info(getName() + " alive, unit on map.");
                return IS_ALIVE;
            }
        }
        // The player does not have any valid units or settlements on the map.

        int mandatory = spec.getInteger("model.option.mandatoryColonyYear");
        if (getGame().getTurn().getYear() >= mandatory) {
            // After the season cutover year there must be a presence
            // in the New World.
            logger.info(getName() + " dead, no presence >= " + mandatory);
            return IS_DEAD;
        }

        // No problems, unit available on carrier but off map, or goods
        // available to be sold.
        if (hasEmbarked) {
            logger.info(getName() + " alive, has embarked unit.");
            return IS_ALIVE;
        } else if (hasGoods) {
            logger.info(getName() + " alive, has cargo.");
            return IS_ALIVE;
        }

        // It is necessary to still have a carrier.
        final Europe europe = getEurope();
        int goldNeeded = 0;
        if (!hasCarrier) {
            int price = Integer.MAX_VALUE;
            if (europe != null) {
                for (UnitType type
                         : spec.getUnitTypesWithAbility(Ability.NAVAL_UNIT)) {
                    int p = europe.getUnitPrice(type);
                    if (p != UNDEFINED && p < price) price = p;
                }
            }
            if (price == Integer.MAX_VALUE || !checkGold(price)) {
                logger.info(getName() + " dead, can not buy carrier.");
                return IS_DEAD;
            }
            goldNeeded += price;
        }

        // A colonist is required.
        if (hasColonist) {
            logger.info(getName() + " alive, has waiting colonist.");
            return IS_ALIVE;
        } else if (europe == null) {
            logger.info(getName() + " dead, can not recruit.");
            return IS_DEAD;
        }
        UnitType unitType = null;
        int price = europe.getRecruitPrice();
        for (UnitType type : spec
                 .getUnitTypesWithAbility("model.ability.foundColony")) {
            int p = europe.getUnitPrice(type);
            if (p != UNDEFINED && p < price) price = p;
        }
        goldNeeded += price;
        if (checkGold(goldNeeded)) {
            logger.info(getName() + " alive, can buy colonist.");
            return IS_ALIVE;
        }

        // Col1 auto-recruits a unit in Europe if you run out before
        // the cutover year.
        logger.info(getName() + " survives by autorecruit.");
        return AUTORECRUIT;
    }