Basic pong game implementation in JS