EduPets provides four dedicated exercise modes — addition, subtraction, multiplication, and division — each accessible from Pingüi’s game menu. Every session is self-contained: the player works through 10 randomly generated multiple-choice questions and has 3 lives before the session ends. Finishing an exercise that matches the active task instantly restores the corresponding pet stat, closing the loop between learning and pet care.Documentation 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.
Exercise overview
| Exercise | Route | JS file | Questions | Lives |
|---|---|---|---|---|
| Addition | /ejercicio1 | Suma.js | 10 | 3 |
| Subtraction | /ejercicio2 | resta.js | 10 | 3 |
| Multiplication | /ejercicio3 | multiplicacion.js | 10 | 3 |
| Division | /ejercicio4 | division.js | 10 | 3 |
Ejercicios.css) and an identical answer-feedback loop; only the question generation logic differs per operation.
How questions are generated
Each question draws two random integers between 1 and 10 inclusive using:Suma.js illustrates the pattern for addition:
- Subtraction — if
b > athe two values are swapped ([a, b] = [b, a]) so the result is never negative. - Division — a
divisorand acociente(each 1–10) are generated first; the dividend shown to the student isdivisor × cociente, guaranteeing a whole-number answer.
Answer options
Each question renders 3 clickable buttons — 1 correct answer and 2 distractors. Distractors are generated by randomly adding or subtracting a small offset from the correct answer, using aSet to avoid duplicates:
Lives and feedback
Each exercise starts with 3 heart icons (vida1, vida2, vida3). Answering incorrectly replaces the highest-numbered remaining heart image with VidaMenos.png and decrements the vidas counter. All buttons are disabled immediately after a selection to prevent double-tapping.
- Correct answer — the selected button turns green (
#a8f5a8) and a success message appears. The next question loads after 1.2 seconds. - Wrong answer — the selected button turns red (
#f8b0b0) and a retry message appears. After 1.5 seconds, either the next question loads (if lives remain) or a failure message is shown before redirecting to/mascotaafter 3.5 seconds.
Pet stat reward
When all 10 questions are answered (regardless of how many lives remain),aumentarOrbeSiCoincide is called with the exercise type. It checks whether the active task’s tipo matches the completed exercise. If it does, the linked stat (orbe) is raised by +20, capped at 100, and tareaActual is removed from localStorage so a fresh task is assigned on the next visit to /mascota.
Exit confirmation
Clicking the Volver back button mid-exercise does not navigate away immediately. Instead it callsconfirmarSalida, which reveals a modal dialog asking:
“¿Estás seguro de que quieres salir de la prueba?”The player can choose “Sí, volver” to return to
/mascota (losing current progress) or “No, me quiero quedar” to dismiss the dialog and continue the exercise.
/examenes) uses a plain <a> link for its back button and does not show this confirmation dialog.