From 3349a171f326ca48345112d459c0b740baa0b94a Mon Sep 17 00:00:00 2001 From: Siamak Date: Fri, 10 Feb 2023 13:04:51 +0100 Subject: [PATCH] Richtung unten erweitern --- src/Spiellogik.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Spiellogik.c b/src/Spiellogik.c index 328e960..1112380 100644 --- a/src/Spiellogik.c +++ b/src/Spiellogik.c @@ -97,7 +97,13 @@ if(richtung == 'u') { else { if(!lose(realU, richtung)) { realU[ii - 1][jj] = groesste + 1; - + for (int i = 0; i < N; i++) { + for (int j = 0; j < N; j++) { + if (realb[i][j] != 0 && realb[i][j] != (N * N) + 1) { + realb[i][j]--; + } + } + } } } }