Index: main.c =================================================================== --- main.c (revision 71488) +++ main.c (working copy) @@ -337,9 +337,12 @@ srand( (unsigned) time( NULL ) ); - /* Temporarily place a mine at the selected box until all the other + /* Temporarily place a mines near the selected box until all the other * mines are placed, this avoids checking in the mine creation loop. */ - p_board->box[selected_col][selected_row].IsMine = TRUE; + for( col = selected_col - 1; col <= selected_col + 1; col++ ) + for( row = selected_row - 1; row <= selected_row + 1; row++ ) { + p_board->box[col][row].IsMine = TRUE; + } /* create mines */ i = 0; @@ -353,8 +356,11 @@ } } - /* Remove temporarily placed mine for selected box */ - p_board->box[selected_col][selected_row].IsMine = FALSE; + /* Remove temporarily placed mines near the selected box */ + for( col = selected_col - 1; col <= selected_col + 1; col++ ) + for( row = selected_row - 1; row <= selected_row + 1; row++ ) { + p_board->box[col][row].IsMine = FALSE; + } /* * Now we label the remaining boxes with the