Browse Source

Merge branch 'branchJulia' into 'main'

merge branchJulia into main

See merge request pmuw_projekt/pmuw_projekt_notebinder!32
remotes/origin/fdai7729-main-patch-86174
fdai8040 11 months ago
parent
commit
cc984695b0
  1. 6
      src/main/c/Pong/pong.c

6
src/main/c/Pong/pong.c

@ -34,11 +34,11 @@ void drawField(int paddle1PositionY, int paddle2PositionY, Ball ball, int score1
} else if ((j == 0 || j == WIDTH) && (i < paddle1PositionY || i >= paddle1PositionY + PADDLE_LENGTH) && (i < paddle2PositionY || i >= paddle2PositionY + PADDLE_LENGTH)) { } else if ((j == 0 || j == WIDTH) && (i < paddle1PositionY || i >= paddle1PositionY + PADDLE_LENGTH) && (i < paddle2PositionY || i >= paddle2PositionY + PADDLE_LENGTH)) {
printf("|"); printf("|");
} else if (i >= paddle1PositionY && i < paddle1PositionY + PADDLE_LENGTH && j == WIDTH) { } else if (i >= paddle1PositionY && i < paddle1PositionY + PADDLE_LENGTH && j == WIDTH) {
printf("%c", PADDLE);
printf("%s", PADDLE);
} else if (i >= paddle2PositionY && i < paddle2PositionY + PADDLE_LENGTH && j == 0) { } else if (i >= paddle2PositionY && i < paddle2PositionY + PADDLE_LENGTH && j == 0) {
printf("%c", PADDLE);
printf("%s", PADDLE);
} else if (i == ball.y && j == ball.x) { } else if (i == ball.y && j == ball.x) {
printf("%c", BALL);
printf("%s", BALL);
} else { } else {
printf(" "); printf(" ");
} }

Loading…
Cancel
Save