int bin_zero_head;
/* Support challenges of non-text types (image, audio, etc.) */
challenge_type_t challenge_type;
+ /* Whether to repeat afterwards (for a little extra reinforcement) */
+ bool_t repeat;
} category_t;
typedef struct _mnemon {
category->time_limit = 0.0;
category->bin_zero_head = 0;
category->challenge_type = CHALLENGE_TYPE_TEXT;
+ category->repeat = 0;
}
static void
}
fprintf (file, "\n\n");
+ fprintf (file, "repeat = %d\n\n", category->repeat);
+
for (i = 0; i < category->num_items; i++) {
item = &category->items[i];
if (i != 0)
value, path, line_count);
exit (1);
}
+ } else if (strcmp (name, "repeat") == 0) {
+ if (strcmp (value, "0") == 0)
+ category->repeat = 0;
+ else
+ category->repeat = 1;
} else {
fprintf (stderr, "Unknown option %s at %s:%d\n",
name, path, line_count);
free (response);
/* Replay audio challenges for reinforcement. */
- if (category->challenge_type == CHALLENGE_TYPE_AUDIO ||
- category->challenge_type == CHALLENGE_TYPE_MIDI)
+ if (category->repeat)
{
mnemon_show_challenge (mnemon, category->challenge_type,
item->challenge);