RoadTripMoustache / kana_to_kanji

Simple application to learn Japanese kana (hiragana, katakana) and kanji
5 stars 1 forks source link

feat: Implement multiple choice question #168

Open apomalyn opened 4 months ago

apomalyn commented 4 months ago

As a user, I want a question with 2 to 4 choices

Requirements

Implement the MultiChoicesQuestion model extending Question. It should be implemented using freezed

MultiChoicesQuestion schema **Note**: the schema is represented using OpenAPI spec for simplicity. ```yaml MultipleChoiceQuestion: description: Representation of a multiple-choice question allOf: - $ref: "#/components/schemas/Question" - properties: rightAnswerIndex: description: Indicate the answer index in the options options: type: array minimum: 2 maximum: 4 items: $ref: "#/components/schemas/MultiChoiceOption" required: - rightAnswerIndex - options MultiChoiceOption: properties: text: type: string description: Text to display tts: type: string description: Text to use for the TTS image: description: Image asset path of the image to display type: string required: - text ```

Implement a multi-choices question, it should:

Design

Question flow ![image](https://github.com/RoadTripMoustache/kana_to_kanji/assets/22211097/823cefac-26fb-425e-a273-9b7a7f1ef08c)

Dependencies

Child of #160

Depends on:

Parents of: