Browse Source

Sortierfunktion wird angepasst.

main
David PC Saiz 2 years ago
parent
commit
12c833d56e
  1. BIN
      build/artifacts/release/Paper-Bin.out
  2. BIN
      build/release/Paper-Bin.out
  3. BIN
      build/release/out/c/Paper-Bin.o
  4. 4
      src/Paper-Bin.c

BIN
build/artifacts/release/Paper-Bin.out

BIN
build/release/Paper-Bin.out

BIN
build/release/out/c/Paper-Bin.o

4
src/Paper-Bin.c

@ -174,8 +174,11 @@ void sortScoreboard()
numberOfLines = j; numberOfLines = j;
sleep(100); sleep(100);
} }
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++)
{ {
if (playerlist[i].Points < playerlist[i + 1].Points) if (playerlist[i].Points < playerlist[i + 1].Points)
{ {
@ -184,7 +187,6 @@ void sortScoreboard()
playerlist[i + 1] = temp; playerlist[i + 1] = temp;
} }
} }
} }
fclose(fp); fclose(fp);
} }
Loading…
Cancel
Save