From e95207146231fa2d697872dc23266d542ca1711a Mon Sep 17 00:00:00 2001 From: fdai7103 Date: Wed, 8 Feb 2023 23:25:25 +0100 Subject: [PATCH] refactoring: Die Variable an die Konvention angepasst --- src/Paper-Bin.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Paper-Bin.c b/src/Paper-Bin.c index 0b1a901..dac0cdc 100644 --- a/src/Paper-Bin.c +++ b/src/Paper-Bin.c @@ -17,7 +17,7 @@ int binY = 10; char field[fieldWidth][fieldHeigth]; int windForce = 0; -int ScorePoints = 0; +int scorePoints = 0; int lifeCount = 3; int ballX = -1; @@ -156,12 +156,12 @@ int main() switch (ball_In_Bin) { case (1): - ScorePoints += 50; + scorePoints += 50; loadLevel(++lvlnumber); break; case(2): - ScorePoints -= 5; + scorePoints -= 5; lifeCount--; if (lifeCount < 1) { @@ -228,10 +228,10 @@ void generateField() system("clear"); buildBin(binX, binY); - if (ScorePoints < 0) - ScorePoints = 0; + if (scorePoints < 0) + scorePoints = 0; - int tmp = ScorePoints; + int tmp = scorePoints; field[12][1] = '0' + tmp % 10; tmp /= 10; @@ -289,7 +289,7 @@ void addScoreboard() printf("Bitte gib deinen Namen ein:\n"); scanf("%s", name); - fprintf(fp, "%s %d\n", name, ScorePoints); + fprintf(fp, "%s %d\n", name, scorePoints); fclose(fp); }