#include <nonsense.h>  // Microsoft programmers Library
#include <lies.h>      // Microsoft standard Library
#include <spyware.h>   // Microsoft Network Connectivity library
#include <process.h>   // For the court of law
#include <press.h>     // Used for Journalist
#include <customers.h> // Annoying People

#define SAY(x) LIE(x)
#define COMPUTERUSER ALL_WANT_TO_BUY_OUR_BUGWARE
#define SOON NEXT_YEAR
#define THE_PRODUCT_IS_READY_TO_SHIP   ANOTHER_BETA_VERSION

void main(int argc,char* argv[])
{
    if (LATEST_WINDOW_VERSION>ONE_MONTH_OLD)
    {
        if (THERE_ARE_STILL_BUGS)
        {
            market(bugfix);
        }
        else
        {
            market(FAKE_BUGFIX_WITH_BUGS);
        }
        if (SALES_DROP_BELOW_CERTAIN_POINT)
        {
            raise(RUMOURS_ABOUT_A_NEW_BUGLESS_VERSION);
        }
        else
        {
            do_nothing_loop();
        }
    }
    while(EVERYONE_CHATS_ABOUT_NEW_VERSION)
    {
        make_false_promise(IT_WILL_BE_MULTITASKING); /* Standard Call, in LIE.h */
        if (RUMOURS_GROW_WILDER)
        {
            make_false_promise(IT_WILL_BE_PLUG_N_PLAY);
        }
        if (RUMOURS_GROW_EVEN_WILDER)
        {
            market_time=RIPE;
            SAY("It will be ready in one month");
            order(programmers, STOP_FIXING_BUGS_IN_OLD_VERSION);
            order(programmers, START_BRAINSTORM_ABOUT_NEW_VERSION);
            order(marketingstaff, PERMISSION_TO_SPREAD_NONSENSE); // From nosense.h
            vapourware=TRUE;
            break;
        }
    }
    switch (NASTY_QUESTIONS_OF_THE_WORLDPRESS)
    {
        case WHEN_WILL_IT_BE_READY:
            SAY("It will be ready in", today+THIRTY_DAYS,"\n we're just testing");
            break;
        case WILL_THIS_PLUG_AND_PLAY_THING_WORK:
            SAY("Yes it will work");
            ask(programmers, WHY_DOES_IT_NOT_WORK);
            pretend(THERE_IS_NO_PROBLEM);
            break;
        case WHAT_ARE_MINIMAL_HARDWARE_REQUIREMENTS:
            SAY("It will run on a 8086 with lightning speed due to the 32 bits architecture");
            inform(INTEL, "Pentium sales will rise skyhigh");
            inform(SAMSUNG, "Start a new memorychip plant 'cos all those customers will need at least 32 megs");
            inform(QUANTUM, "Thanks to our fatware your sales will triple");
            get_big_bonus(INTEL, SAMSUNG, QUANTUM);
            break;
        case DOES_MICROSOFT_GET_TOO_MUCH_INFLUENCE:
            SAY("Oh no, we are just here to make a better world for everyone");
            register(journalist, BIG_BILL_BOOK);
            if(TIME_IS_RIPE)
            {
                arrest(journalist);
                brainwash(journalist);
                if(journalist_says(windows95_is_bugfree))
                {
                    order(journalist, "write a nice objective article");
                    release (journalist);
                }
            }
            break;
    }
    while (vapourware)
    {
        introduction_date++; /* Delay */
        if (NO_ONE_BELIEVES_ANYMORE_THERE_WILL_BE_A_RELEASE)
        {
            order(programmers,STOP_DEBUGGING);
            order(programmers,STOP_ERRORHANDLING);
            worrking_on_new_version(BEGIN_FAST);
            break;
        }
        SAY("It will be ready in",today+ONE_MONTH);
    }
    release(BETA_VERSION);
    while (EVERYONE_IS_DUMB_ENOUGH_TO_BUY_OUR_BUGWARE)
    {
        bills_bank_account += 150*megabucks;
        release(NEW_AND_EVEN_BETTER_BETA_VERSION);
        introduce(MORE_MEMORY_REQUIREMENTS);
        if (customers_report(INSTALLATION_PROBLEMS))
        {
            SAY("that is a hardware problem, not a software problem");
            if (smart_customer_says(BUT_YOU_PROMISED_PLUG_AND_PLAY))
            {
                ignore(customer);
                order(microsoft_intelligence_agency, "Keep an eye on this bastard");
            }
        }
        if ( bills_bank_account>SKYHIGH && marriage>TWO_YEARS )
        {
            divorce(WOMAN_THAT_WAS_BEATIFULL_WHEN_I_MARRIED_HER);
            wave(dollars, AT_LUSTY_CHICKS);
            marry(YOUNG_BLOND_VIRGIN_WITH_BIG_BOOBIES);
            devirginize(YOUNG_BLOND_VIRGIN_WITH_BIG_BOOBIES);
            if (BOOBIES_START_TO_HANG)
            {
                dump(YOUNG_BLOND_VIRGIN_WITH_BIG_BOOBIES);
            }
        }
        if (exist(ANOTHER_COMPANY))
        {
            steal(THEIR_IDEAS);
            accuse(compagny, STEALING_OUR_IDEAS);
            hire(A_LOT_OF_LAWYERS); /* in process.h */
            wait(UNTIL_OTHER_COMPANY_CANNOT_AFFORD_ANOTHER_LAWSUIT);
            buy_out(OTHER_COMPANY);
        }
    }
    /* Now everyone realizes that we sell bugware and they are all angry at us */
    order(plastic_surgeon, MAKE_BILL_LOOK_LIKE_POOR_BASTARD);
    buy(NICE_LITTLE_ISLAND);
    hire(HAREM);
    laugh_at(everyone,FOR_HAVING_THE_PATIENCE_YEAR_AFTER_YEAR_FOR_ANOTHER_UNFINISHED_VERSION);
}


void bugfix(void)
{
    charge(A_LOT_OF_MONEY);
    if (customer_says(HE_DOES_NOT_WANT_TO_PAY_FOR_BUGFIX))
    {
        SAY("It is not a bugfix but a new version");
    }
    if (STILL_COMPLAINTS)
    {
        while(CUSTOMER_NOT_GIVEN_UP);
        {
            ignore(CUSTOMER);
            do_nothing_loop();
        }
        register(CUSTOMER, BIG_BILL_BOOK);
        /* We'll get him when everyone uses Billware!!*/
    }
}