X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=word-game.c;h=d4fa77e822582cc82086fc17779857a9baacaaad;hb=95950fcacd327b24eb22bad24d15f377c0640e2c;hp=8c9af9a59071feda5567f90cfecea9f014f32083;hpb=a6f9c10c08f706c3c25ab81fef956339490e50f3;p=wordgame diff --git a/word-game.c b/word-game.c index 8c9af9a..d4fa77e 100644 --- a/word-game.c +++ b/word-game.c @@ -82,7 +82,7 @@ word_game_play (const char *puzzle, for (i=0; i < 17; i++) possible_total += possible[i]; - printf ("%s\n\n", puzzle); + printf ("%s\n", puzzle); just_saw_puzzle = TRUE; remaining = time_limit_seconds; @@ -105,7 +105,7 @@ word_game_play (const char *puzzle, break; if (strlen (response) == 0) { if (! just_saw_puzzle) { - printf ("%s\n\n", puzzle); + printf ("%s\n", puzzle); just_saw_puzzle = TRUE; } else { for (i = 2; i <= 17; i++) @@ -146,14 +146,19 @@ word_game_play (const char *puzzle, } } while (remaining > 0); - printf ("%s\n\n", 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,