this function supposed to open all empty spaces..
but it does not work properly..
Code:void openemptyspace(int x, int y) { /* Declarations */ int i; int j; /* nested for loops and if statments*/ for(i = -1; i <= 1; i++) { for(j = -1; j <= 1; j++) { if(showmines[x + i][y + j] == '-' ) { showmines[x + i][y + j] = mines[x + i][y + j]; if(showmines[x + i][y + j] == '0' ) { openemptyspace(x + i, y + j); } /* end if */ } /* end outer if*/ } /*end inner for loop */ } /* end outer for loop */ }