Browse Source

Die Sortierung-Funktion der Spieler wird eingebaut

main
fdai7172 2 years ago
parent
commit
132a0e46f4
  1. 12
      src/Paper-Bin.c

12
src/Paper-Bin.c

@ -173,6 +173,18 @@ void sortScoreboard()
numberOfLines = j;
sleep(100);
}
struct Player temp;
for (int i = 0; i <= numberOfLines; i++)
{
if (playerlist[i].Points < playerlist[i + 1].Points)
{
temp = playerlist[i];
playerlist[i] = playerlist[i + 1];
playerlist[i + 1] = temp;
}
}
}
fclose(fp);
}
Loading…
Cancel
Save