Pinball in javascript