From 232a3650f69ae9792499a11e903a6805db0ee92c Mon Sep 17 00:00:00 2001 From: Siamak Date: Fri, 10 Feb 2023 18:37:43 +0100 Subject: [PATCH] Updatefunktion verbessert --- src/Spiellogik.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Spiellogik.c b/src/Spiellogik.c index f7c875e..4f41931 100644 --- a/src/Spiellogik.c +++ b/src/Spiellogik.c @@ -98,8 +98,8 @@ int update(int realU[N][N],char 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]--; + if (realU[i][j] != 0 && realU[i][j] != (N * N) + 1) { + realU[i][j]--; } } }