diff --git a/src/main/c/Pong/game.c b/src/main/c/Pong/game.c index 11a11b4..c6067ed 100644 --- a/src/main/c/Pong/game.c +++ b/src/main/c/Pong/game.c @@ -7,13 +7,22 @@ #define HEIGHT 20 //Höhe Spielfeld #define PADDLE_LENGTH 4 #define PADDLE '#' +#define BALL 'O' + +//Ballstruktur +typedef struct { + int x; + int y; + int speedX; + int speedY; +} Ball; // Bildschirm löschen nach Veränderung Position void clearScreen() { system("clear"); } -void drawField(int paddle1PositionY, int paddle2PositionY) { +void drawField(int paddle1PositionY, int paddle2PositionY, Ball ball) { clearScreen(); for (int i = 0; i <= HEIGHT; i++){