Add built-in answer tones and automatic multiple-choice progression

This commit is contained in:
Brian Holman committed 2026-11-09 20:30:45 -07:00
1 parent 9f7d6f4786
commit 0bfee790a8
18 files changed
+1658 -21

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
#ifndef QUIZ_H
#define QUIZ_H
#define STATE_COUNT 50
#define ANSWER_SIZE 40
typedef unsigned char U8;
typedef struct { const char *code; const char *name; const char *capital; } State;
extern const State states[50];
extern U8 order[50], options[4], question, score, corrections;
extern U8 answered[50], correct[50], corrected[50];
extern char responses[50][ANSWER_SIZE];
extern unsigned random_state;
void quiz_start(unsigned seed);
unsigned quiz_random(unsigned bound);
void quiz_options(U8 state);
void normalize(const char *in, char *out);
/* 2 exact/alias, 1 near, 0 wrong (including a different known capital). */
U8 classify(U8 state, const char *answer);
void quiz_record(U8 state, const char *answer, U8 right, U8 spelling);
#endif