Browse Source

refactoring: ballstruktur

remotes/origin/branchJulia
fdai8040 11 months ago
parent
commit
9fad188369
  1. 6
      test/Pong/test_updateBallPosition.c

6
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;

Loading…
Cancel
Save