From cb4a24635b14d829d641b309da5b9ff996d6a429 Mon Sep 17 00:00:00 2001 From: fdai7172 Date: Wed, 8 Feb 2023 23:03:12 +0100 Subject: [PATCH] =?UTF-8?q?refactoring:=C3=9Cbersicht=20in=20Main=20angepa?= =?UTF-8?q?sst?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Paper-Bin.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Paper-Bin.c b/src/Paper-Bin.c index 48e500d..15b8679 100644 --- a/src/Paper-Bin.c +++ b/src/Paper-Bin.c @@ -136,24 +136,21 @@ void loadLevel(int lvlnum) int main() { - loadLevel(lvlnumber); while (1) { clearField(); field[ballX][ballY -= 1] = 'O'; generateField(); - int Ball_In_Bin = checkBallPosition(); - switch (Ball_In_Bin) { case (1): ScorePoints += 50; loadLevel(++lvlnumber); - break; + case(2): ScorePoints -= 5; lifeCount--; @@ -167,22 +164,19 @@ int main() scanf(" %c", &choice); system("start \"\" \"https://youtu.be/dQw4w9WgXcQ\""); return 0; - } addScoreboard(); sortScoreboard(); return 0; - } loadLevel(lvlnumber); break; - } Ball_In_Bin = 0; - sleep(1); } } + void getStartPosition() {