From fcafc560127e5e098761c0e1fcfa941ce3da370b Mon Sep 17 00:00:00 2001 From: andrea Date: Sat, 14 Mar 2026 21:37:29 +0100 Subject: [PATCH] move players and ball --- arduino_pong.ino | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arduino_pong.ino b/arduino_pong.ino index 4a9f469..86a2915 100644 --- a/arduino_pong.ino +++ b/arduino_pong.ino @@ -131,12 +131,20 @@ void move_ball() { ball_x= ball_reset_x; ball_y= ball_reset_y; p2_score += 1; + Serial.print("Player 2: "); + Serial.println(p2_score); + Serial.print("Player 1: "); + Serial.println(p1_score); } else if (ball_x == 11) { // p1 score, reset board ball_x= ball_reset_x; ball_y= ball_reset_y; p1_score += 1; + Serial.print("Player 2: "); + Serial.println(p2_score); + Serial.print("Player 1: "); + Serial.println(p1_score); } else if (ball_y == 0 || ball_y == 7) {