The exam mode atDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Edupets-Studio/Edu-pets/llms.txt
Use this file to discover all available pages before exploring further.
/examenes challenges students with a mixed set of questions drawn from all four math operations in a single session. Unlike the standalone exercise modes, the exam does not focus on one operation — each question can be addition, subtraction, multiplication, or division, selected at random. Students have 2 lives and must work through 5 questions to reach the success screen, after which they are automatically returned to their pet.
Exam structure
The exam session is governed by three top-level variables:generarPregunta checks whether all 5 questions have been answered. If they have, a success message is shown and the player is redirected to /mascota after 4 seconds. Otherwise, a random operation is picked from tiposOperaciones and new numbers are generated:
Question types
Theswitch statement in generarPregunta handles each operation type as follows:
| Operation | Key | How a and b are used | Answer |
|---|---|---|---|
| Addition | "suma" | Both drawn 1–10 | a + b |
| Subtraction | "resta" | Swapped if b > a to prevent negatives | a - b |
| Multiplication | "multiplicación" | Both drawn 1–10 | a × b |
| Division | "división" | a is the quotient; dividend shown is a × b | a (whole number guaranteed) |
Answer options
The exam renders 4 option buttons per question — 1 correct answer and 3 distractors. Options are built using aSet to guarantee uniqueness, then shuffled before display:
Correct and incorrect feedback
Answer verification disables all buttons immediately to prevent multiple selections, then applies a colour highlight and a short delay before advancing:- Correct — button turns green; next question after 1.2 s.
- Incorrect — button turns red; a life heart is replaced with
VidaMenos.png; next question (or failure screen) after 1.5 s.
End conditions
The exam session ends in one of two ways:Success — all 5 questions answered
When
preguntas >= totalPreguntas at the top of generarPregunta, a success banner (“¡Examen completado! ¡Excelente!”) is displayed. The player is automatically redirected to /mascota after 4 seconds.The exam does not check or update
tareaActual. Completing the exam — whether successfully or not — always redirects to /mascota without granting a stat boost. Pet stat rewards are only granted by the individual exercise modes (/ejercicio1–/ejercicio4) when the finished exercise type matches the active task.