+ if (safe_closed > 0 && safe_closed <= 9) {
+ /*
+ * In the situation where there's a very small number
+ * of _non_-mine squares left unopened, it's helpful
+ * to mention that number in the status line, to save
+ * the player from having to count it up
+ * painstakingly. This is particularly important if
+ * the player has turned up the mine density to the
+ * point where game generation resorts to its weird
+ * pathological fallback of a very dense mine area
+ * with a clearing in the middle, because that often
+ * leads to a deduction you can only make by knowing
+ * that there is (say) exactly one non-mine square to
+ * find, and it's a real pain to have to count up two
+ * large numbers of squares and subtract them to get
+ * that value of 1.
+ *
+ * The threshold value of 8 for displaying this
+ * information is because that's the largest number of
+ * non-mine squares that might conceivably fit around
+ * a single central square, and the most likely way to
+ * _use_ this information is to observe that if all
+ * the remaining safe squares are adjacent to _this_
+ * square then everything else can be immediately
+ * flagged as a mine.
+ */
+ if (safe_closed == 1) {
+ sprintf(statusbar + strlen(statusbar),
+ " (1 safe square remains)");
+ } else {
+ sprintf(statusbar + strlen(statusbar),
+ " (%d safe squares remain)", safe_closed);
+ }
+ }