My Shiny Weblog!

programming, photography and lifestyle

life.c

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <family.h> /* needed for make_sex() */
#include <friends.h>
#include <god.h>

void life()
{
   long money = 0;
   short friends = 0, partner = 0;
   int days_of_life = rand() % DAYS_MAX; /* defined in god.h */

   while (days_of_life) {
      wake_up(); eat(&money); /* XXX money might be 0 */
      if (money < LONG_MAX) money += work(); /* too much time wasted here */
#ifdef MALE
      drink_beer(friends, &money); friends++;
      if (meet_women(&money)) partner = 1; /* effect on money not defined */
#endif
#ifdef FEMALE
      shopping(&money); gossip(friends); /* same here */
      if (find_rich_male()) { money = LONG_MAX; partner = 1; }
#endif
      eat(&money); relax(); watch_tv();
      if (!sleep() && partner) { make_sex(&partner) ? life() : 0; }
      days_of_life--;
   }
   return; /* XXX this should return flag for heaven or hell */
}