Browse Source

refactoring: doppelt_schon_in_pong.c

remotes/origin/branchJulia
fdai8040 11 months ago
parent
commit
7ced4d7fca
  1. 13
      test/Pong/test_updateBallPosition.c

13
test/Pong/test_updateBallPosition.c

@ -2,20 +2,7 @@
#include "unity.h" #include "unity.h"
#include "pong.h" #include "pong.h"
typedef struct {
int x;
int y;
int speedX;
int speedY;
} Ball;
void updateBallPosition(Ball *ball) { void updateBallPosition(Ball *ball) {
struct Ball {
int x;
int y;
int speedX;
int speedY;
};
ball->x += ball->speedX; ball->x += ball->speedX;
ball->y += ball->speedY; ball->y += ball->speedY;

Loading…
Cancel
Save