+static int game_status(game_state *state)
+{
+ /*
+ * We report the game as lost only if the player has used the
+ * Solve function to reveal all the mines. Otherwise, we assume
+ * they'll undo and continue play.
+ */
+ return state->won ? (state->used_solve ? -1 : +1) : 0;
+}
+