1d ping pong game