Bouncing balls in a cube