A physics simulation of bouncing balls in 1D using Python/Pygame