Completion of the main function

Listing 3 completes the main function.

Listing 3. Completion of the main function.

  //Loop until the user presses the Esc key.
  while( !key[KEY_ESC]){
    moveBall();
  }//end while loop

  return 0;
}//end main
END_OF_MAIN();

Listing 3 uses a while loop as an animation loop.

The animation loop causes the program to run until the user presses the Esc key.