|
|
@ -203,6 +203,14 @@ int pong(){ |
|
|
|
printf("Spieler 2 gewinnt!\n"); |
|
|
|
} |
|
|
|
|
|
|
|
int checkGameEnd(int score1, int score2, int maxScore) { |
|
|
|
if (score1 >= maxScore || score2 >= maxScore) { |
|
|
|
return 1; // Das Spiel endet |
|
|
|
} else { |
|
|
|
return 0; // Das Spiel endet nicht |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return 0; |
|
|
|
} |
|
|
|
|
|
|
|