Example #1
0
void check_timeout() {
  if (!playing) return;
  
  if (time()-lasttime > 60*TRIVIA_TIMEOUT) {
    trivia_line("Game timed out after "+(string)TRIVIA_TIMEOUT+" minutes idle.");
    do_end();
  }
  else
    call_out("check_timeout", 60*2);
}
/* ************************************************** */
int main(int argc, char *argv[]) {
    if (do_parse(argc, argv) ||  /* parse arguments */
	do_init()            ||  /* initialization  */
	do_configuration()   ||  /* configuration   */
	do_bootstrap()) {        /* bootstrap       */
        goto end;
    }
    do_observe();                /* observe         */
    do_end();                    /* end             */
    goto end;

 end:
    do_clean();                  /* clean           */
    return 0;
}
Example #3
0
inline void SpatialObjectBuilder::end()
{
    do_end();
}