Language: C

if (x < cols - 1 && previousMove != 0) {
    // up
    board[zeroIndex] = board[zeroIndex - rows];
    zeroIndex -= rows;

    foundAnswer = blindSearch(x + 1, y, moves - 1, 1);
    if (foundAnswer) {
      //printf("yes\n");
      return 1;
    }

    board[zeroIndex] = board[zeroIndex + rows];
    zeroIndex += rows;
  }

  return 0;
}

int main() {
  int i, x, y;
  current = 0;

  for (i = 0; i < N; i++) {
    scanf("%d", &board[i]);
    if (!board[i])
      zeroIndex = i;
  }

  x = cols - (zeroIndex / rows) - 1;
  y = rows - (zeroIndex % cols) - 1;

  //printf("zero index coordinates are: %d %d\n", x, y);

  while (current < 5) {
    if (blindSearch(x, y, current, -1)) {
      printf("%d\n", current);
      return;
    }
    current++;
  }

  //printf("Couldn't find an answer!\n");
}



Compiler output:
main.c:1:1: error: expected identifier or '(' before 'if'
    1 | if (x < cols - 1 && previousMove != 0) {
      | ^~
main.c:16:3: error: expected identifier or '(' before 'return'
   16 |   return 0;
      |   ^~~~~~
main.c:17:1: error: expected identifier or '(' before '}' token
   17 | }
      | ^
main.c: In function 'main':
main.c:21:3: error: 'current' undeclared (first use in this function)
   21 |   current = 0;
      |   ^~~~~~~
main.c:21:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:23:19: error: 'N' undeclared (first use in this function)
   23 |   for (i = 0; i < N; i++) {
      |                   ^
main.c:24:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   24 |     scanf("%d", &board[i]);
      |     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | if (x < cols - 1 && previousMove != 0) {
main.c:24:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   24 |     scanf("%d", &board[i]);
      |     ^~~~~
main.c:24:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:24:18: error: 'board' undeclared (first use in this function)
   24 |     scanf("%d", &board[i]);
      |                  ^~~~~
main.c:26:7: error: 'zeroIndex' undeclared (first use in this function)
   26 |       zeroIndex = i;
      |       ^~~~~~~~~
main.c:29:7: error: 'cols' undeclared (first use in this function)
   29 |   x = cols - (zeroIndex / rows) - 1;
      |       ^~~~
main.c:29:27: error: 'rows' undeclared (first use in this function)
   29 |   x = cols - (zeroIndex / rows) - 1;
      |                           ^~~~
main.c:35:9: error: implicit declaration of function 'blindSearch' [-Wimplicit-function-declaration]
   35 |     if (blindSearch(x, y, current, -1)) {
      |         ^~~~~~~~~~~
main.c:36:7: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   36 |       printf("%d\n", current);
      |       ^~~~~~
main.c:36:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:36:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:36:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:37:7: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   37 |       return;
      |       ^~~~~~
main.c:19:5: note: declared here
   19 | int main() {
      |     ^~~~