change the structure of the code, move common routine into ball.c
compile the client code