23 lines
562 B
TypeScript
23 lines
562 B
TypeScript
export type ExercisePartType = 'struct-definition' | 'typedef-struct' | 'array-initialization' | 'pointer-manipulation' | 'printf' | 'function-definition' | 'main-function';
|
|
|
|
export interface ExercisePart {
|
|
id: string;
|
|
prompt: string;
|
|
solution: string;
|
|
points: number;
|
|
type: ExercisePartType;
|
|
}
|
|
|
|
export interface Exercise {
|
|
id: string;
|
|
title: string;
|
|
parts: ExercisePart[];
|
|
explanation: string;
|
|
}
|
|
|
|
export interface CheckResult {
|
|
partId: string;
|
|
isCorrect: boolean;
|
|
explanation: string;
|
|
error?: string; // To hold API or parsing errors
|
|
} |