From 30113289f419cdf49197eb02e42037ffc1527081 Mon Sep 17 00:00:00 2001 From: Siamak Date: Fri, 10 Feb 2023 16:57:28 +0100 Subject: [PATCH] Links weiter --- src/Spiellogik.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Spiellogik.c b/src/Spiellogik.c index 169bb51..3e713ca 100644 --- a/src/Spiellogik.c +++ b/src/Spiellogik.c @@ -148,6 +148,13 @@ int update(int realU[N][N],char richtung) { if (!lose(realU, richtung)) { realU[ii][jj - 1] = max + 1; } + for (int i = 0; i < N; i++) { + for (int j = 0; j < N; j++) { + if (realU[i][j] != 0 && realU[i][j] != (N * N) + 1) { + realU[i][j]--; + } + } + } } }