From d2655de9c35a028c1f68993033a5066289997030 Mon Sep 17 00:00:00 2001 From: Daniel M Date: Thu, 8 Feb 2024 12:23:34 +0100 Subject: [PATCH] =?UTF-8?q?refactoring=20:=20Zeillen=20abstandverbessert?= =?UTF-8?q?=20um=20Code=20=C3=BCbersichtlicher=20zumachen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../out/c/duellist-spielesammlung-projekt.o | Bin 13908 -> 13908 bytes .../test_duellist_spielesammlung_projekt.out | Bin 102734 -> 102734 bytes .../test_duellist_spielesammlung_projekt.pass | 2 +- src/main/duellist-spielesammlung-projekt.c | 10 +++++++--- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/build/test/out/c/duellist-spielesammlung-projekt.o b/build/test/out/c/duellist-spielesammlung-projekt.o index ba37b1f72e617bda3092fa706a2069a2a7983c5d..cbb206443264b434d714a98ad06a98a3eddd222d 100644 GIT binary patch delta 947 zcmY*X&ubGw6n+!7>7v1yG-_`%(w=s|@6G$Z_r94!_t5=v*C027dxp`u zN&W&rq`R4z<6jcOO44hzXYfhVYPhZ4`iyy;Fva=%s@+YT74RWBB0`NO3IaY-(1wMY z=Q!0}R(ER5acv-F^6DJGolD|a|Az*ULV>dCfK*yk%1T~KG9c?gJeTeik&5x=J?y>8 z=a#+2X)l_GP?J)!FVfXhxM&DtLiwVy@srPH;5jVftW}FT)(((k5!8d=LvEpSEVqOV z8Y!e@aAZ8jZ8B)1P%MjaDs(;@rm2XOVKrKH-|>L_oWlSckZaOL`($F{?_6=8S4pK` zi~?jZuyHsFnvdmWYSLUG-QX)uWW_c3hU%X}&Sp*DV^3SYyqhMFVbIN|I>S?{!&9mX z=^16A)CBgEj2Ek|3TzeyGHa{$A(jQF+!a}6022x1NV>0`rf9C7?IHM5JNVFE+ZtJVp zN8_n32u31BlxC;+L0!3U5lHLIq;GVZk;#PVMzYYQ zAB3S8OB7V%N?X;VlU*SZMmT z-PmzjcGIz43rLkbJ_T_7EI&5*t^njvpej2cm*#@gp}w@^wbmQX+= ziIf74jK`Qw0c|8o6){eUP8Z`eC6UuiuhR-_AIOh64A6s8n|k5@iH*N8#pkR_>Vq>$ zfC2_Kjz>ZBvA9e{m`kK;Y{k!_;%aO|`A?x_IqkrA?sfukH*Fxps8`N)hsRWh$5bU! z3-|yeN^y_(v4_9avKrKOwrMbBsfKLmSOJ}q7A%^+y(R7C)94>|*_M0kO?UxF-;w{M$b(q>O_5XrB#c5E>?tdh#;tMMZJ4~@yx AwEzGB diff --git a/build/test/out/test_duellist_spielesammlung_projekt.out b/build/test/out/test_duellist_spielesammlung_projekt.out index 5169aa3c025e69a26e96cd5219c936f28fa1122a..824d61c2e194704a73a2b781089a3f1d71fcd848 100644 GIT binary patch delta 968 zcmY+CO=uHA6vy8z+qj2FP0Xi_XNe#h`jKGKL`6hsi;7^uLKBm1cWRnQx*;NzD1wNf zamgW&E*Of3c$6MWvqCOK@KO~Np@(`9y!er;r{c`p*+g&qe{bLaH~%-Yv+mkicRhbB zt!)`kW~B7}*SjZvRL_xp05~|Cf=?0vF)K2F=N&7N^VpG$v}fyIIp-}ED}(N=H(Sh? zmkWc+b|CAWdd%9d+C0_`DWN4mUF0Tn$fAsTkHBPo~q~J2Io7;@GV71ABT{R(v` zijY-s4GC)4;W+>muhhcrfG9XRWiVi)BcYlloG_pAe5UkUpdTD zhFzVe(nU@0SG6!!D>SET{bCLR*^-(O$HBz|X>$7K>H7EI-b+o}66}CN$)O6>HOgLQ za|oZ_+z4LDn!THJ3zH~Of`^X;#zPmR+Lj`VhwYYB!($f&T1zuOR z2(>ObBuW$vrgteMNQ7L9;H4@k(p(E({FAGv(wR52iQe{mZ{PQu@6GHs9J>w2v&YI- z+j^2zPI=z;&i*XVkOKfXIvaQ~=jURw6O%DAt1O-M@0qUC5V)-C1`!pDnKD zhLxMH&;0+Zay;wma+x6C34mfzSC7l2l$A%nj+Y~3=T;o9@p^rS@jW;Zk-vZkj}wu8 zs@nh(wavk+=Q8tYs;5_gjAQjW^SXy#(<8Rm_`nP4wp7u&EC&@!^I%lrqgYOkIxSJA zdwD4Cf^X5#vjg%TU*g7%ICLF6#0LiUV~9PG8vMwWO7&wR9AeNZKT@T125`Sp9Shj& zl?6{QoiFB0y#SSq{SU|Tj8K`nkd#Zm=FDlN#uwM8czWZC35 zg%cTL%`6yqil#olYUK1aAk7C1vW`pba0sSpa!6URK*VYON0CbN<71G@$(dU=vyfs} zM|ER~nu970Vzp#sOgboLz?UxQDR~@RJdhfve@j$;{Bd8Y2}=+GrBVYW!=wg#nY9so zdUIoVCC|lf7D9g$ak#)TO&$T@2YXSu*!TKg3NLzcnnga(+I%;!D$D)Qf3BiM8^hS1YV?6>KI0Uy8XWY<= height) || (column < 0) || (column >= width)) { printf("Exception: Outside the minefield!\n"); return -1; } - // If there is a mine at this position if (mines[row][column] == 1) { return 0; } - - // If there is no mine at the position, count how many mines are around it if ((row + 1 < height) && (mines[row + 1][column] == 1)) { counter++; } @@ -291,6 +293,7 @@ int field_check(char** minefield, char** mines, int height, int width, int row, return 1; } +//Überprüfe ob eine Mine getroffen wurde int end_check(char** minefield, char** mines, int height, int width) { int i, j; for (i = 0; i < height; i++) { @@ -304,6 +307,7 @@ int end_check(char** minefield, char** mines, int height, int width) { return 1; } +//befreie anliegendes Feld void free_minefield(char** minefield, int height) { int i; // Free each vector