X-Git-Url: https://git.cworth.org/git?p=mnemon;a=blobdiff_plain;f=mnemon.c;h=6600798c77d9f29429e6f1bc18633008e0d3452f;hp=e13d3b9ff9f707f458a8ca02ec5b0c31818922a9;hb=16ea9ef431682b5339ac94b29d235ea0af5d24a5;hpb=a6ba5c83f3b9f07411c5e281488ced3b354d2b53 diff --git a/mnemon.c b/mnemon.c index e13d3b9..6600798 100644 --- a/mnemon.c +++ b/mnemon.c @@ -649,14 +649,22 @@ mnemon_do_challenges (mnemon_t *mnemon) mnemon_remove_bin (mnemon, bin); if (correct) { - printf ("Correct!\n\n"); + printf ("Correct! (Moving from %d to ", item->count); item->count++; + /* We reserve an item count of 0 for an item that has + * never been asked. */ + if (item->count == 0) + item->count = 1; + 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) + /* Penalize an incorrect response by forcing the count + * negative. */ + if (item->count >= 0) item->count = -1; + printf ("%d)\n\n", item->count); } bin = mnemon_get_bin (mnemon, item->count);