From 4e567d5131a52ebda77dea02b9a947f87ceec362 Mon Sep 17 00:00:00 2001 From: Ronja Awe Date: Wed, 1 Feb 2023 11:48:07 +0100 Subject: [PATCH] =?UTF-8?q?if=20Anweisung=20wenn=20nicht=20loesbar=20inuge?= =?UTF-8?q?f=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/c/labyrinth.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/c/labyrinth.c b/src/c/labyrinth.c index f791a7f..ef4b942 100644 --- a/src/c/labyrinth.c +++ b/src/c/labyrinth.c @@ -40,6 +40,9 @@ void wegsuchen(lab laby, bool* done, int y, int x, int ziely, int zielx){ if (!*done && x - 1 >= 0 && laby[y][x-1] == '0'){ // links wegsuchen(laby, done, y, x - 1, ziely, zielx); } + if (!*done){ + laby[y][x] = '0'; + } } } \ No newline at end of file