Browse Source

sleep() Aufrufe und Schleifenbedingung in sortScoreboard angepasst

main
fdai7103 2 years ago
parent
commit
f54ff5280a
  1. 6
      src/Paper-Bin.c

6
src/Paper-Bin.c

@ -325,11 +325,11 @@ void sortScoreboard()
playerlist[j].Points = playerPoints; playerlist[j].Points = playerPoints;
numberOfLines = j; numberOfLines = j;
sleep(100);
sleep(0.1);
} }
struct Player temp; struct Player temp;
for (int i = 0; i <= numberOfLines; i++)
for (int i = 0; i < numberOfLines; i++)
{ {
for (int j = 0; j < (numberOfLines - i); j++) for (int j = 0; j < (numberOfLines - i); j++)
{ {
@ -347,7 +347,7 @@ void sortScoreboard()
for (int j = 0; j < numberOfLines; j++) for (int j = 0; j < numberOfLines; j++)
{ {
printf("%d. %s %s %d\n", j + 1, (j < 9) ? " " : " ", playerlist[j].Name, playerlist[j].Points); printf("%d. %s %s %d\n", j + 1, (j < 9) ? " " : " ", playerlist[j].Name, playerlist[j].Points);
sleep(500);
sleep(0.5);
} }

Loading…
Cancel
Save