DESIGN OUTLINE for CSCI-e215 Assignment 4
Russell J Lowke

    pong.c
    
      AUTHOR: Russell Lowke
   CSCIE-215: Assignment Four


       Usage: pong

              use 'j' and 'k' keys to move paddle
              use 'x' key to add more balls   (MAX 100)
              use '<' and '>' keys to change gravity
              use 'f' to speed game up
              use 's' to slow game down
              use 'q' to quit

 Description: Pong game!

              A version of pong.
              Objective is to get as many pong balls in play as possible.
              Every four (4) times a ball is deflected by the paddle
              a new pong ball is added.
              How many pong balls can you keep in the air at one time?

              If all balls get past the paddle 3 times, the game is over.


      Method: Pong.c contains main, has all general fctns,
              and also contains the parameters for the court (playing
              area) in a static struct called mCourt.
              key fctns are:

                setUp     - establishes pong settings and vars
                            sets an alarm to call update every [delay]
                            milliseconds
                main      - main loop simply reads keyboard input, letting
                            alarm take care of the updates.
                            on 'q' key pong wraps up all settings and
                            memory via wrap_up.  ctrl 'c' is disabled to
                            ensure wrap_up
                wrap_up   - Cleans up all settings before exiting.
                update    - calls updateBall and refresh
                drawCourt - draws the playing court
    
    
              Ball.c, Paddle.c and alarmlib.c are modular segments of
              code, each focusing on a specific task.

              both ball.c and paddle.c use "get" functions to retrieve
              information about the court from pong.c.   This way all vars
              are protected and no globals used.


              ball.c handles multiball,
              key fctns are:

                updateball  - updates all balls in play
                addBall     - adds a new ball to the field
                removeBall  - removes ball from field
                newBall     - mallocs memory for the ball
                drawBall    - displays a ball
                isBallOut   - checks if ball is out of the court


              paddle.c handles the paddle control,
              key fctns are:

                init_paddle - prepares the paddle
                up_paddle   - move paddle up
                down_paddle - move paddle down
                draw_paddle - displays the paddle
                is_a_hit    - tells if the paddle hits a ball

              alarmlib.c handles setting alarm, key fctns are:
                set_ticker  - arranges for the interval timer to issue
                              SIGALRM's at regular intervals
                            

