export type VariableTermKind = "constant" | "variable"; export interface VariableParenthesisTerm { kind: VariableTermKind; coefficient: number; variable?: "x"; } export interface DistributedVariableTerm { kind: VariableTermKind; coefficient: number; variable?: "x"; latex: string; } export interface VariableTermChoice { id: string; coefficient: number; variable?: "x"; latex: string; } export interface VariableParenthesisProblem { id: string; key: string; multiplier: number; operator: "+" | "-"; firstTerm: VariableParenthesisTerm; secondTerm: VariableParenthesisTerm; correctTerms: [DistributedVariableTerm, DistributedVariableTerm]; choices: [VariableTermChoice[], VariableTermChoice[]]; latexBefore: string; latexAfter: string; } export interface VariableUserAnswer { selectedChoiceIds: [string | null, string | null]; } export interface VariableGradeResult { correct: boolean; userAnswer: [DistributedVariableTerm | null, DistributedVariableTerm | null]; correctAnswer: [DistributedVariableTerm, DistributedVariableTerm]; }