diff --git a/build/artifacts/release/Paper-Bin.out b/build/artifacts/release/Paper-Bin.out index 77d7a10..0dfb638 100644 Binary files a/build/artifacts/release/Paper-Bin.out and b/build/artifacts/release/Paper-Bin.out differ diff --git a/build/release/Paper-Bin.out b/build/release/Paper-Bin.out index 77d7a10..0dfb638 100755 Binary files a/build/release/Paper-Bin.out and b/build/release/Paper-Bin.out differ diff --git a/build/release/out/c/Paper-Bin.o b/build/release/out/c/Paper-Bin.o index 18a83f2..a3a5e70 100644 Binary files a/build/release/out/c/Paper-Bin.o and b/build/release/out/c/Paper-Bin.o differ diff --git a/src/Paper-Bin.c b/src/Paper-Bin.c index 38b72ad..c41c569 100644 --- a/src/Paper-Bin.c +++ b/src/Paper-Bin.c @@ -47,7 +47,7 @@ struct Player { char Name[50]; int Points; -} playerlist[11]; +} playerList[11]; //Methode die den Eimer erstellt void buildBin(int width, int heigth) @@ -332,12 +332,12 @@ void sortScoreboard() for (int j = 0; fgets(line, sizeof line, file) != NULL && j <= 10; j++) { char* playerTmp = strtok(line, " "); - strcpy(playerlist[j].Name, playerTmp); + strcpy(playerList[j].Name, playerTmp); playerTmp = strtok(NULL, " "); int playerPoints = atoi(playerTmp); - playerlist[j].Points = playerPoints; + playerList[j].Points = playerPoints; numberOfLines = j; sleep(0.1); @@ -349,11 +349,11 @@ void sortScoreboard() { for (int j = 0; j < (numberOfLines - i); j++) { - if (playerlist[i].Points < playerlist[i + 1].Points) + if (playerList[i].Points < playerList[i + 1].Points) { - tmp = playerlist[i]; - playerlist[i] = playerlist[i + 1]; - playerlist[i + 1] = tmp; + tmp = playerList[i]; + playerList[i] = playerList[i + 1]; + playerList[i + 1] = tmp; } } } @@ -363,7 +363,7 @@ void sortScoreboard() printf(" Scoreboard:\n\n"); 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(0.5); } @@ -371,7 +371,7 @@ void sortScoreboard() FILE* fp = fopen("ScoreBoard.txt", "w"); for (int i = 0; i < numberOfLines; i++) { - fprintf(fp, "%s %d\n", playerlist[i].Name, playerlist[i].Points); + fprintf(fp, "%s %d\n", playerList[i].Name, playerList[i].Points); } fclose(fp);