From f880ce634a6f82d217dcf71e22144eb534f29614 Mon Sep 17 00:00:00 2001 From: fdai7172 Date: Wed, 8 Feb 2023 22:54:02 +0100 Subject: [PATCH] =?UTF-8?q?refactoring:=20Variablennamen=20f=C3=BCr=20den?= =?UTF-8?q?=20Ball=20korrigiert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/artifacts/release/Paper-Bin.out | Bin 21456 -> 21456 bytes build/release/Paper-Bin.out | Bin 21456 -> 21456 bytes build/release/out/c/Paper-Bin.o | Bin 13752 -> 13752 bytes src/Paper-Bin.c | 28 +++++++++++++------------- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/build/artifacts/release/Paper-Bin.out b/build/artifacts/release/Paper-Bin.out index bf006376bf4dca26c308054af5b0972c9825d19a..de2de35c78996cfba7532afe801c7d32b03b03c8 100644 GIT binary patch delta 848 zcmZ8eUr19?7(Zvb3&RPU+dQ77?T$v48MxQ}(AxBJHzZm?D5bbfW1|`9gnSDL10f;% z@S%q=DcD0$ts6vA!WbI$(u7`u2vV@UBuRgu7ww#L&tC3%_`Y*~zu))!&iPKYh^s~X ze9G?Kxa9l(zC6^})^)o72XVdFDtvVsckJsv{KXieR5`KgK}ern)8`y3V)w2V`@OfP z&(73#S(;5;>Kum-Q^@W0)2SfxDe13T!j0F3OHpn zg$hnveb4d33Viw$p+zR_cc!V!-K|D_@N8$0~$R5FBKo8qQr3=Bcwvf z=D{k=M+uH|6kic>40fV~PBMiX`BCH|5-V#n^G&Xy_avJ=Z=#Bs&;v-u2!13qD@@aj zT&UV=lABWVQFQ5oonC@B;2YD|U^+(P+fr{(Q#dU3|3oi}T$WzDQt$Db!kFF6PT_nI z&h`*|Ozh9Vcn_iH*bCe?iW;Pkv`3d=iLqmxMHG20U2ecSV{bE-za{52tCr<7?gH*5 zG$h#w`z*c=n+YvIn6XRJS+zJnffQq3GuFlC9J1VM73LZHLDc$DoBW0PoIgRCO>a}Y z?vIEK5Yz~6fh3C^Jcc7|9{dM~EqyhCQ`Bm~`*;-{jg^&8I;!TtXM Dkk-97 delta 887 zcmZuvO=uHQ5T4g$54IJP#;|Tm&4#py2$J+*r6-#-VVg>^4T6G|tW7k*G_@N`tB4Rx z4?%k4~VW|6-4e-&vK@pJA=%5Lq#IdVHi~sH>?mh?4gt`D#vhqjs`}_xyR1 zF!%Q6JC7EPl$zA@YWzwjl~q%jTuL3Ao1RV?>h(GGk}AY;-cKyF6AQY_p=1sVRPnI{vd)fT7Yb+Zt>Vyg(P`~xK1!9)N6 diff --git a/build/release/Paper-Bin.out b/build/release/Paper-Bin.out index bf006376bf4dca26c308054af5b0972c9825d19a..de2de35c78996cfba7532afe801c7d32b03b03c8 100755 GIT binary patch delta 848 zcmZ8eUr19?7(Zvb3&RPU+dQ77?T$v48MxQ}(AxBJHzZm?D5bbfW1|`9gnSDL10f;% z@S%q=DcD0$ts6vA!WbI$(u7`u2vV@UBuRgu7ww#L&tC3%_`Y*~zu))!&iPKYh^s~X ze9G?Kxa9l(zC6^})^)o72XVdFDtvVsckJsv{KXieR5`KgK}ern)8`y3V)w2V`@OfP z&(73#S(;5;>Kum-Q^@W0)2SfxDe13T!j0F3OHpn zg$hnveb4d33Viw$p+zR_cc!V!-K|D_@N8$0~$R5FBKo8qQr3=Bcwvf z=D{k=M+uH|6kic>40fV~PBMiX`BCH|5-V#n^G&Xy_avJ=Z=#Bs&;v-u2!13qD@@aj zT&UV=lABWVQFQ5oonC@B;2YD|U^+(P+fr{(Q#dU3|3oi}T$WzDQt$Db!kFF6PT_nI z&h`*|Ozh9Vcn_iH*bCe?iW;Pkv`3d=iLqmxMHG20U2ecSV{bE-za{52tCr<7?gH*5 zG$h#w`z*c=n+YvIn6XRJS+zJnffQq3GuFlC9J1VM73LZHLDc$DoBW0PoIgRCO>a}Y z?vIEK5Yz~6fh3C^Jcc7|9{dM~EqyhCQ`Bm~`*;-{jg^&8I;!TtXM Dkk-97 delta 887 zcmZuvO=uHQ5T4g$54IJP#;|Tm&4#py2$J+*r6-#-VVg>^4T6G|tW7k*G_@N`tB4Rx z4?%k4~VW|6-4e-&vK@pJA=%5Lq#IdVHi~sH>?mh?4gt`D#vhqjs`}_xyR1 zF!%Q6JC7EPl$zA@YWzwjl~q%jTuL3Ao1RV?>h(GGk}AY;-cKyF6AQY_p=1sVRPnI{vd)fT7Yb+Zt>Vyg(P`~xK1!9)N6 diff --git a/build/release/out/c/Paper-Bin.o b/build/release/out/c/Paper-Bin.o index 9ede2473f93e5d97538ddf5900f8d838ecc6d1ff..1fd438c014b5ade118bc16b24c3f83c163d9ae49 100644 GIT binary patch delta 160 zcmdmyy(4>rgb>r=C6gtE}COB88)`0%)AJO zq{&8-D%?qlIXOT!kc`}%D0!Zf(Qvb&ay~1g$>fC^;*92#cWUS}x=nrwB$FmfYPvI~ wZcfxZ&M0ZZ$N&bnxgj(YkYWa6^U03d%Nfl#ztn!t1k`;|FCM7FP`{lG07+ghrgb-uPWGNwezK05FjYSG6naLT73=9mD-Gs7%5}So$H}eb2vava3=0z|# zO*WEL;dV;Q$*Eufk(HYhCC_s*8f-RH&Szybp1e>)oY8FZP7QrV*U2w|Wa4B=O?SqW x&54@F86}MwfyM&CZEgt71f-aO*le<+_HstE%`df|GXZs9)Qbn|Fw}2n0{~$0D^&mh 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; }