X-Git-Url: https://git.cworth.org/git?p=mnemon;a=blobdiff_plain;f=mnemon.c;h=d28657bfe20d8a4c877bbbb30edf98d2694a74a7;hp=67b5889dcfa1040d56c17a33bad250906bd94420;hb=ad1afbd96d6a1de1b49e365a7573af1c1b09f557;hpb=c99ea4af83e849df05018d4e72121f8f73de8bd2 diff --git a/mnemon.c b/mnemon.c index 67b5889..d28657b 100644 --- a/mnemon.c +++ b/mnemon.c @@ -637,8 +637,10 @@ mnemon_do_challenges (mnemon_t *mnemon) printf ("%s\n", item->challenge); response = readline ("> "); - if (response == NULL) + if (response == NULL) { + printf ("\n"); break; + } correct = (strcmp (response, item->response) == 0); @@ -647,18 +649,16 @@ mnemon_do_challenges (mnemon_t *mnemon) mnemon_remove_bin (mnemon, bin); if (correct) { - printf ("Correct!\n\n"); - if (item->count < 0) - item->count = 1; - else - item->count++; + printf ("Correct! (Moving from %d to ", item->count); + item->count++; + printf ("%d)\n\n", item->count); } else { - printf (" %s is the correct answer.\n\n", - item->response); + printf (" %s is the correct answer. (Moving from %d to ", + item->response, item->count); + item->count--; if (item->count > 0) item->count = -1; - else - item->count--; + printf ("%d)\n\n", item->count); } bin = mnemon_get_bin (mnemon, item->count);