From f54ff5280a224e40447bd2918b54dcf8777389ff Mon Sep 17 00:00:00 2001 From: fdai7103 Date: Wed, 8 Feb 2023 21:18:53 +0100 Subject: [PATCH] sleep() Aufrufe und Schleifenbedingung in sortScoreboard angepasst --- src/Paper-Bin.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Paper-Bin.c b/src/Paper-Bin.c index 6d88552..0a4803a 100644 --- a/src/Paper-Bin.c +++ b/src/Paper-Bin.c @@ -325,11 +325,11 @@ void sortScoreboard() playerlist[j].Points = playerPoints; numberOfLines = j; - sleep(100); + sleep(0.1); } 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++) { @@ -347,7 +347,7 @@ void sortScoreboard() for (int j = 0; j < numberOfLines; j++) { printf("%d. %s %s %d\n", j + 1, (j < 9) ? " " : " ", playerlist[j].Name, playerlist[j].Points); - sleep(500); + sleep(0.5); }