core: better card styling and var name cleaning

This commit is contained in:
Trianta
2024-08-09 18:46:40 -05:00
parent 71dfedb6ee
commit 157b9c36fa
3 changed files with 25 additions and 16 deletions
+3 -1
View File
@@ -89,9 +89,11 @@ function loop() {
if (ball.dx < 0) {
BotMovesPaddle(leftPaddle);
document.getElementById("leftPaddle").innerHTML = leftPaddle.y;
}
if (ball.dx > 0) {
BotMovesPaddle(rightPaddle);
BotMovesPaddle(rightPaddle);
document.getElementById("rightPaddle").innerHTML = rightPaddle.y;
}
// move paddles by their velocity