|
@ -174,17 +174,19 @@ 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++) |
|
|
{ |
|
|
{ |
|
|
if (playerlist[i].Points < playerlist[i + 1].Points) |
|
|
|
|
|
{ |
|
|
|
|
|
temp = playerlist[i]; |
|
|
|
|
|
playerlist[i] = playerlist[i + 1]; |
|
|
|
|
|
playerlist[i + 1] = temp; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int j = 0; j < (numberOfLines - i); j++) |
|
|
|
|
|
{ |
|
|
|
|
|
if (playerlist[i].Points < playerlist[i + 1].Points) |
|
|
|
|
|
{ |
|
|
|
|
|
temp = playerlist[i]; |
|
|
|
|
|
playerlist[i] = playerlist[i + 1]; |
|
|
|
|
|
playerlist[i + 1] = temp; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
fclose(fp); |
|
|
fclose(fp); |
|
|
} |
|
|
} |