title: C# XNA Paddle ball game
body: <p>Hey guy's im making a a paddle ball/pong game and i'm trying to figure out how to make the ball "bounce" away randomly off the paddle like other pong games.</p>
  
  <p>What would the easiest way to do this be?</p>
  
  <p>currently my collision code just makes it bounce of in the other direction (up)</p>
  
  <pre><code>public void checkCollision()
  {
      Rectangle paddlerect = new Rectangle((int)Paddle.pos.X, (int)Paddle.pos.Y, Paddle.paddle.Width, Paddle.paddle.Height);
      Rectangle ballrect = new Rectangle((int)pos.X, (int)pos.Y, ball.Width, ball.Height);
  
      if (ballrect.Intersects(paddlerect))
      {
          yspeed = 3;
      }
  }
  </code></pre>
  
  <p>Could you show me how to make it bounce of randomy to the sides? Like on a diaganol.</p>