From a092be6985a86ee424a5ff17f52d8ccd891dff78 Mon Sep 17 00:00:00 2001 From: Jannis Date: Fri, 3 Feb 2023 10:49:49 +0100 Subject: [PATCH] Funktion lose --- .vscode/tasks.json | 28 ++++++++++++++++++++++++++++ src/Umgebung | Bin 0 -> 20088 bytes src/Umgebung.c | 41 ++++++++++++++++++++++++++++++++++++++++- 3 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 .vscode/tasks.json create mode 100755 src/Umgebung diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..2c3fd7a --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,28 @@ +{ + "tasks": [ + { + "type": "cppbuild", + "label": "C/C++: gcc-11 build active file", + "command": "/usr/bin/gcc-11", + "args": [ + "-fdiagnostics-color=always", + "-g", + "${file}", + "-o", + "${fileDirname}/${fileBasenameNoExtension}" + ], + "options": { + "cwd": "${fileDirname}" + }, + "problemMatcher": [ + "$gcc" + ], + "group": { + "kind": "build", + "isDefault": true + }, + "detail": "Task generated by Debugger." + } + ], + "version": "2.0.0" +} \ No newline at end of file diff --git a/src/Umgebung b/src/Umgebung new file mode 100755 index 0000000000000000000000000000000000000000..50b19129a624179cda62aa2b6614e5a5eafcf301 GIT binary patch literal 20088 zcmeHP32+qGnSMQ^Mk9?*#36w(ZEPHqL?bR^4r3(4n2`+_1KL1rXBcK$qk%b;nI3bL z!5Ep86`2HlB;G0(aILqJP1d_)b2%3X>=^8L6I{ur$l+bG8#z)z94r%;k`T{+|2tYe z9Vv0LyH#7YdaCLF{ojAQzyE&S{kmU2JrrDZhey+xDqeOQBW`c4K$@jsVNg~;n%P2D ziS0~w0~-gvgkwV9EC{5coc9z{pTxbOWLHm>5$H7nW{Ro^iIUxDWwUHRQC1@~$xf%L z{vr*V}E-j|VWL`cisj?%M?Dk5#z0yw6%M=ib zqAH&h2K^Swe7fmuGD1<*ZPy{~+;oL7V~SE6RMz)dvA?9fwbITvL-=viq=1>Cs=a$) zM|pX#M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g z{@iJ=o--7s7q!mfZvQ6`I_-DN5Za19MnXq%x8DaD-m~&^kkr)w^-%w($E~k;Mc;x= zwZmRL=j~`DZ^QjnaKpT^re*RMbcS-$!B|878C_8oh=>ot;gj zjioVy*jr_$Y-il@06!c_ZeoLnRA-TLn1M{hEzeW|Y8GG+e( z8xa-KrK0E*X)n;>?GowG?N`|;%~_+^Z groesste){ + groesste = realU1[i][j]; + ii = i; + jj = j; + } + } + } + if(richtung == 'u'){ + if(realU[ii - 1][jj] != 0){ + return 1; + } + } + if(richtung == 'd'){ + if(realU[ii + 1][jj] != N){ + return 1; + } + } + if(richtung == 'l'){ + if(realU[ii][jj-1] != 0){ + return 1; + } + } + if(richtung == 'r'){ + if(realU[ii][jj + 1] > N){ + return 1; + } + } + return 0; + + +} \ No newline at end of file