From 7c9a0d4b27269bc3fd2dbbce89f5b5c638331987 Mon Sep 17 00:00:00 2001 From: Jason Bou-Samra <154414066+bou-samra@users.noreply.github.com> Date: Sun, 9 Jun 2024 12:25:18 +1000 Subject: [PATCH] Update cluster_research.c --- src/cluster_research.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/cluster_research.c b/src/cluster_research.c index 24cf6f1..e1c4f63 100644 --- a/src/cluster_research.c +++ b/src/cluster_research.c @@ -136,18 +136,18 @@ int main (void) { // diagonal north/east match research - for (k = 0; k < 11; k++) { + for (k = 17; k > 6; k--) { for (i = 0; i < 6; i++) { counter = 1; for (j = 0; j < 2; j++) { - if (grid[i + j+k][i + j] == grid[i + j + 1+k][i + j + 1] && grid[i + j + 1+k][i + j + 1] != 0) { + if (grid[k - i - j][i + j] == grid[k - i - j - 1][i + j + 1] && grid[k - i - j - 1][i + j + 1] != 0) { counter = counter + 1; } } if (counter == 3) { - printf("dse. match\n"/*add to cluster list*/); + printf("dne. match\n"/*add to cluster list*/); } else { - printf("no dse. match\n"); + printf("no dne. match\n"); } } @@ -159,12 +159,12 @@ int main (void) { for (i = 0; i < z; i++) { counter = 1; for (j = 0; j < 2; j++) { - if (grid[i + j+k][i + j] == grid[i + j + 1+k][i + j + 1] && grid[i + j + 1+k][i + j + 1] != 0) { + if (grid[i + j + k][i + j] == grid[i + j + 1 + k][i + j + 1] && grid[i + j + 1 + k][i + j + 1] != 0) { counter = counter + 1; } } if (counter == 3) { - printf("dse. match\n"/*add to cluster list*/); + printf("dne. match\n"/*add to cluster list*/); } else { printf("no dse. match\n"); } @@ -183,9 +183,9 @@ int main (void) { } } if (counter == 3) { - printf("dse. match\n"/*add to cluster list*/); + printf("dne. match\n"/*add to cluster list*/); } else { - printf("no dse. match\n"); + printf("no dne. match\n"); } } z = z - 1;