is there a way to group conditional operators in an if statement?
something like this:
if (obsticle.x > 980 && (rightPaddle.y < obsticle.y < rightPaddle.y+200))
{
xi *= -1;
}
obsticle.x = obsticle.x + (1*xi);
the goal is if obsticle.x is between the two numbers then it will change directions. if not it will continue unchanged.