Listing 5. Draw the ball in the new location.

  acquire_screen();
  circlefill (screen,tempX,tempY,radius,makecol(0,0,0));
  circlefill (screen,x,y,radius,makecol( 128, 255, 0));
  release_screen();

  rest(5);//Delay for five milliseconds
}// end moveBall function.