Reveal solution functionality completed
[wordblah.git] / wordblox.h
index e27d37c..1925573 100644 (file)
@@ -69,6 +69,7 @@ typedef struct {
        char char_ans[MAX_PUZZLE_SIZE][MAX_PUZZLE_SIZE];
        int cur_row;
        int cur_col;
+       bool solution_revealed;
        enum ORIENTATION current_movement;
 } MainPlayerData;
 
@@ -861,7 +862,7 @@ void print_menu (enum COLOR fg, enum COLOR bg, const char* title,
                reset_color (); printf ("\n");
 }
 
-/* reset the player data, from the new file */
+/* reset the player data, loading from the puzzle file */
 void reset_player_data (MainPlayerData *app_data, const char *filename)
 {
        app_data->puzzle = load_puzzle (filename);
@@ -869,6 +870,7 @@ void reset_player_data (MainPlayerData *app_data, const char *filename)
        app_data->is_loaded = app_data->puzzle.grid_frozen;
        app_data->cur_col = -1;
        app_data->cur_row = -1;
+       app_data->solution_revealed = false;
        strcpy (app_data->filename, filename);
        /* reset the answer keys */
        for (int i = 0; i < app_data->puzzle.grid_size; i ++)