int main(int argc, char ** argv) { int count; struct life_t life; init(&life, &argc, &argv); for (count = 0; count < life.generations; count++) { copy_bounds(&life); eval_rules(&life); update_grid(&life); } cleanup(&life); exit(EXIT_SUCCESS); }
int main(int argc, char ** argv) { int count; struct life_t life; init(&life, &argc, &argv); while (1) { if (life.do_display) do_draw(&life); copy_bounds(&life); eval_rules(&life); update_grid(&life); throttle(&life); } cleanup(&life); exit(EXIT_SUCCESS); }