double x = ball.x
double y = ball.y
double speed = ball.speed;
if(x >= 450) {
ball.xdir = -ball.xdir;
}
if(y <= 0)// Player scores
{
user_score += 1;
ball.speed+=computer_score/10;
ball.ydir = -ball.ydir;
}
if(x < 0)
{
ball.xdir = -ball.xdir;
}
if(y >= 400) // Computer scores
{
computer_score+=1;
ball.speed+=computer_score/10;
ball.ydir = -ball.ydir;
}
coder requires 0xf00d before continue().Killer Eagle Software [edited by - DevLiquidKnight on October 22, 2003 5:53:15 PM]