diff --git a/build/artifacts/release/Paper-Bin.out b/build/artifacts/release/Paper-Bin.out index bf00637..de2de35 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 bf00637..de2de35 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 9ede247..1fd438c 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 0e4bfa5..0eb0c4f 100644 --- a/src/Paper-Bin.c +++ b/src/Paper-Bin.c @@ -17,8 +17,8 @@ int windForce = 0; int ScorePoints = 0; int lifeCount = 3; -int Ballx = -1; -int Bally = 27; +int ballX = -1; +int ballY = 27; int windIntervall = 0; int lvlnumber = 1; @@ -52,8 +52,8 @@ void buildBin(int width, int heigth){ void loadLevel(int lvlnum){ clearField(); - Ballx = -1; - Bally = 27; + ballX = -1; + ballY = 27; int tmpX,tmpY; @@ -135,7 +135,7 @@ int main() while (1) { clearField(); - field[Ballx][Bally -= 1] = 'O'; + field[ballX][ballY -= 1] = 'O'; Generatefield(); int Ball_In_Bin = checkBallPosition(); @@ -180,24 +180,24 @@ int main() void getStartPosition() { - while (Ballx == -1) + while (ballX == -1) { for (int i = 2, j = 0; i <= 20; i += 2, j++) { - field[i][Bally] = j + '0'; + field[i][ballY] = j + '0'; } Generatefield(); //printf("W\x84\hle die position des Balls (0-9):\n"); printf("Wähle die position des Balls (0-9):\n"); - scanf("%d", &Ballx); + scanf("%d", &ballX); - if (Ballx < 0 || 9 < Ballx) + if (ballX < 0 || 9 < ballX) { - Ballx = -1; + ballX = -1; continue; } - Ballx = (Ballx + 1)*2; + ballX = (ballX + 1)*2; } @@ -250,7 +250,7 @@ void Generatefield() { } if (lvlnumber > 6 && windIntervall % 2 == 0) { - windForce < 0 ? (Ballx -= windForce * -1) : (Ballx += windForce); + windForce < 0 ? (ballX -= windForce * -1) : (ballX += windForce); } windIntervall++; @@ -285,11 +285,11 @@ void addScoreboard() int checkBallPosition() { - if (binY + 2 == Bally && (Ballx == binX || Ballx == binX + 1 || Ballx == binX - 1)) + if (binY + 2 == ballY && (ballX == binX || ballX == binX + 1 || ballX == binX - 1)) { return 1; } - else if (binY + 1 >= Bally || field[Ballx][Bally - 1] == '_' || Ballx >= fieldWidth || Ballx <= 0) + else if (binY + 1 >= ballY || field[ballX][ballY - 1] == '_' || ballX >= fieldWidth || ballX <= 0) { return 2; }