BHXSpecter

Untitled

Nov 21st, 2011
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.76 KB | None | 0 0
  1. if (bouncer_x <= (p1Paddle_x + PADDLE_SIZE_X) && bouncer_y >= p1Paddle_y && (bouncer_y + BOUNCER_SIZE) <= (p1Paddle_y + PADDLE_SIZE_Y))
  2.             {
  3.                 bouncer_x++;
  4.                 cout << "Contact P1 Paddle" << endl;
  5.                
  6.                 outfile << right << setw(8) <<  bouncer_x << setw(13) << p1Paddle_x << setw(11) << bouncer_y << setw(10) << p1Paddle_y << setw(18) << p1Paddle_y + PADDLE_SIZE_Y << endl;
  7.             }
  8.        
  9.             if((bouncer_x + BOUNCER_SIZE) >= p2Paddle_x && bouncer_y >= p2Paddle_y && (bouncer_y + BOUNCER_SIZE) <= (p2Paddle_y + PADDLE_SIZE_Y))
  10.             {
  11.                 bouncer_x--;
  12.                 cout << "Contact P2 Paddle" << endl;
  13.                 outfile << right << setw(8) << bouncer_x << setw(13) << p2Paddle_x << setw(11) << bouncer_y << setw(10) << p2Paddle_y << setw(18) << p2Paddle_y + PADDLE_SIZE_Y << endl;
  14.             }
  15.  
Advertisement
Add Comment
Please, Sign In to add comment