From 9fad188369fcf5398d7cd220882e89e767367350 Mon Sep 17 00:00:00 2001 From: fdai8040 Date: Sat, 3 Feb 2024 18:08:39 +0000 Subject: [PATCH] refactoring: ballstruktur --- test/Pong/test_updateBallPosition.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/Pong/test_updateBallPosition.c b/test/Pong/test_updateBallPosition.c index fe5fc3d..a5c98a6 100644 --- a/test/Pong/test_updateBallPosition.c +++ b/test/Pong/test_updateBallPosition.c @@ -18,7 +18,11 @@ void tearDown(void){ void test_updateBallPosition(void){ /* arrange */ - Ball ball = { 10, 10, 1, 1 }; + Ball ball; + ball.x = 10; + ball.y = 10; + ball.speedX = 1; + ball.speedY = 1; int expectedX = ball.x + ball.speedX * 5; // erwartete Endposition nach 5 Schritten int expectedY = ball.y + ball.speedY * 5;