It is fairly easy to change the code so that the circle moves vertically and bounces at the top and bottom edge.