|
@ -29,7 +29,7 @@ void drawField(int paddle1PositionY, int paddle2PositionY, Ball ball, int score1 |
|
|
for (int j = 0; j <= WIDTH; j++){ |
|
|
for (int j = 0; j <= WIDTH; j++){ |
|
|
if (i == 0 || i == HEIGHT){ |
|
|
if (i == 0 || i == HEIGHT){ |
|
|
printf("-"); |
|
|
printf("-"); |
|
|
} 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("%c", PADDLE); |
|
|