public boolean checkSetState(UnitState s) {
        switch (s) {
        case ACTIVE:
        case SENTRY:
            return true;
        case IN_COLONY:
            return !isNaval();
        case FORTIFIED:
            return getState() == UnitState.FORTIFYING;
        case IMPROVING:
            return location instanceof Tile
                && getOwner().canAcquireForImprovement(location.getTile());
        case SKIPPED:
            if (getState() == UnitState.ACTIVE) return true;
            // Fall through
        case FORTIFYING:
            return (getMovesLeft() > 0);
        default:
            logger.warning("Invalid unit state: " + s);
            return false;
        }
    }