if(rightPressed && paddleX < canvas.width-paddleWidth) {
paddleX += 7;
}
else if(leftPressed && paddleX > 0) {
paddleX -= 7;
}
&&, <
Doesn't the first operator end with true or false? How do you calculate it with the inequality sign?
if(rightPressed && paddleX < canvas.width-paddleWidth) {
paddleX += 7;
}
else if(leftPressed && paddleX > 0) {
paddleX -= 7;
}
&&, <
Doesn't the first operator end with true or false? How do you calculate it with the inequality sign?