X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=word-game.c;h=d4fa77e822582cc82086fc17779857a9baacaaad;hb=ea2a992111737eccb174f26f71ab5357597d5147;hp=e12787d4e8abc33a62f1b99a6174eddd69f7b894;hpb=0cb3ed6bc1a5fc1c4e88b0785fd6eb11aa7ca7d5;p=wordgame diff --git a/word-game.c b/word-game.c index e12787d..d4fa77e 100644 --- a/word-game.c +++ b/word-game.c @@ -148,12 +148,17 @@ word_game_play (const char *puzzle, printf ("%s\n", puzzle); - printf ("Words you found:\n"); - dict_print_by_length_if (answers, seen_predicate); + if (found_total) { + printf ("Words you found:\n"); + dict_print_by_length_if (answers, seen_predicate); + printf ("\n"); + } - printf ("\nWords you missed:\n"); - dict_print_by_length_if (answers, unseen_predicate); - printf ("\n"); + if (found_total < possible_total) { + printf ("Words you missed:\n"); + dict_print_by_length_if (answers, unseen_predicate); + printf ("\n"); + } printf ("You found %d of %d words (%.2f%%)\n", found_total, possible_total,