From 51ec729979fe26f15031a4064207dbfdbfec4e2f Mon Sep 17 00:00:00 2001 From: Trianta <56975502+Trimutex@users.noreply.github.com> Date: Mon, 30 Dec 2024 17:11:37 -0600 Subject: [PATCH] pong: fix which bot should idle --- src/pong.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pong.ts b/src/pong.ts index cc1200b..89ed43a 100644 --- a/src/pong.ts +++ b/src/pong.ts @@ -122,7 +122,7 @@ class PongCore { // Simulate game logic simulate() { - if (this.ball.dx > 0) { + if (this.ball.dx < 0) { this.botInput(this.left); this.botIdle(this.right); } else {