#include iolib.h #include float.h /* Floating point library with random numbers */ #include printf1.h /* PRINTF library */ #define take 35 /* Cell ASCII value */ #define clear 32 /* Space ASCII value */ #define xmax 80 /* Max x cols */ #define ymax 20 /* Max y rows */ #define part 3 /* Number of neighbours to survive */ int cell[2000]; int x,y,count,gen; /***********************************************/ /* LIFE this verison by KEVIN GROVES (C) 1989 */ /* */ /* The compiler used it Small-C. */ /* for other compilers, remove functions */ /* that are include with it. */ /***********************************************/ main() { blank(); /* Blank cell array first */ firstgen(); /* create first generation */ cls(); /* Clear screen */ life(); /* Create life..... */ } life() { gen=1; while(1) /* Loop for ever */ { home(); x=1; y=1; /* Check each cell */ while((y++).45) cell[count]=take; else cell[count]=clear; }