DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T f

⟦83f67cea3⟧ TextFile

    Length: 822 (0x336)
    Types: TextFile
    Names: »feed_pop.c«

Derivation

└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
    └─⟦this⟧ »EUUGD18/General/Galaxy/src/feed_pop.c« 

TextFile

/*
 * %W% (mrdch&amnnon) %G%
 */

# include "header"

feedpop (s)
char   *s;
{
    int     i,
            j;

    i = atoi (s);               /* see how much he wants to give */

    if (i <= 0) {
        say ("But sir, please be more generous !!!");
        return;
    }
    assert_money (i);           /* see if he has that much */
    skipword (s);
    assert_end (s);             /* does it end properly? */
    teller[player] -= i;        /* take his money */
    food[player] += i;          /* and give it to the poors */
    j = food[player] * FEED_RATIO;
    i = count_popul (player) - count_class (player, CITI);
    if (j > i)                  /* he gave them more then enough */
        say ("Thousands thanks, my lord !!");
    else
        say ("%d of your people might starve to death, my lord.", i - j);
}