From 72ea50db30dfc8c457d944b9623373cec815e6a5 Mon Sep 17 00:00:00 2001 From: = <=> Date: Wed, 24 Jan 2024 19:09:03 +0100 Subject: [PATCH] Right side winning --- src/VisibleObjects/Ball.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/VisibleObjects/Ball.h b/src/VisibleObjects/Ball.h index bcc52a2..09a9d59 100644 --- a/src/VisibleObjects/Ball.h +++ b/src/VisibleObjects/Ball.h @@ -54,7 +54,8 @@ public: } else if (screenEdgeVertical) { vec2d->bump(BumpType::WALL, PaddleDirection::NONE); } else if (scoreSide.has_value()) { - score->incrementScore(scoreSide.value()); + // Invert side + score->incrementScore(scoreSide.value() == Side::LEFT ? Side::RIGHT : Side::LEFT); resetPosition(); } if (paddleSide.has_value()) {