108 lines
3.3 KiB
TypeScript
108 lines
3.3 KiB
TypeScript
import type { Stage } from '../types'
|
|
|
|
const exercises: any[] = []
|
|
|
|
// Pair number with quantity
|
|
for (let n = 1; n <= 10; n++) {
|
|
const emojis = ['🐶', '🐱', '🐰', '🐸', '🐵', '🐼', '🐨', '🦊', '🐻', '🐯']
|
|
const animal = emojis[n - 1]
|
|
const howMany = animal.repeat(Math.min(n, 5)) + (n > 5 ? ` (${n})` : '')
|
|
|
|
exercises.push({
|
|
id: `num3-cantidad-${n}`,
|
|
stage: 3,
|
|
skillCode: `correspondencia-${n}`,
|
|
type: 'conciencia',
|
|
prerequisites: n === 1 ? ['num2-trazo-10'] : [`num3-cantidad-${n - 1}`],
|
|
content: {
|
|
instruction: `¿Cuántos ${animal} hay?`,
|
|
audioText: `Contá los animalitos`,
|
|
text: n <= 5 ? animal.repeat(n) : `${animal.repeat(5)}... +${n - 5}`,
|
|
options: [
|
|
...Array.from({ length: 10 }, (_, i) => i + 1)
|
|
.filter(j => j !== n)
|
|
.slice(0, 2)
|
|
.map(j => ({ label: String(j), correct: false, id: String(j) })),
|
|
{ label: String(n), correct: true, id: String(n) },
|
|
].sort(() => Math.random() - 0.5),
|
|
emoji: animal,
|
|
},
|
|
functionalContext: 'Asociar cantidad con número.',
|
|
errorType: 'discriminacion-auditiva',
|
|
})
|
|
}
|
|
|
|
// Match groups that are equal
|
|
const pares = [
|
|
{ a: '🐶🐶🐶', b: '3️⃣', num: 3 },
|
|
{ a: '🐱🐱🐱🐱', b: '4️⃣', num: 4 },
|
|
{ a: '🐰🐰🐰🐰🐰', b: '5️⃣', num: 5 },
|
|
{ a: '🐸🐸', b: '2️⃣', num: 2 },
|
|
{ a: '🐵🐵🐵🐵🐵🐵', b: '6️⃣', num: 6 },
|
|
]
|
|
|
|
for (const { a, b, num } of pares) {
|
|
exercises.push({
|
|
id: `num3-emparejar-${num}`,
|
|
stage: 3,
|
|
skillCode: 'correspondencia',
|
|
type: 'conciencia',
|
|
prerequisites: [`num3-cantidad-${num}`],
|
|
content: {
|
|
instruction: `¿Cuál número le corresponde a ${a}?`,
|
|
audioText: `¿Qué número es?`,
|
|
text: a,
|
|
options: [
|
|
...pares.filter(p => p.num !== num).slice(0, 2).map(p => ({ label: p.b, correct: false, id: String(p.num) })),
|
|
{ label: b, correct: true, id: String(num) },
|
|
].sort(() => Math.random() - 0.5),
|
|
emoji: '🔄',
|
|
},
|
|
functionalContext: 'Emparejar grupos con su número.',
|
|
errorType: 'confusion-letra',
|
|
})
|
|
}
|
|
|
|
// More/less comparison
|
|
const comparaciones = [
|
|
{ a: 3, b: 5, mas: 5, menos: 3 },
|
|
{ a: 2, b: 7, mas: 7, menos: 2 },
|
|
{ a: 4, b: 4, mas: 4, menos: 4 },
|
|
{ a: 6, b: 3, mas: 6, menos: 3 },
|
|
{ a: 1, b: 9, mas: 9, menos: 1 },
|
|
]
|
|
|
|
for (const { a, b, mas, menos } of comparaciones) {
|
|
const idA = '⭐'.repeat(a)
|
|
const idB = '⭐'.repeat(b)
|
|
exercises.push({
|
|
id: `num3-mas-${a}-${b}`,
|
|
stage: 3,
|
|
skillCode: 'comparacion',
|
|
type: 'conciencia',
|
|
prerequisites: [`num3-cantidad-${Math.max(a, b)}`],
|
|
content: {
|
|
instruction: `¿Dónde hay MÁS?`,
|
|
text: `${idA} vs ${idB}`,
|
|
audioText: `¿Cuál tiene más?`,
|
|
options: [
|
|
{ label: `👈 ${a}`, correct: mas === a, id: `izq-${a}` },
|
|
{ label: `👉 ${b}`, correct: mas === b, id: `der-${b}` },
|
|
{ label: '😐 Igual', correct: a === b, id: 'igual' },
|
|
],
|
|
emoji: '⚖️',
|
|
},
|
|
functionalContext: 'Comparar cantidades (más/menos).',
|
|
errorType: 'discriminacion-auditiva',
|
|
})
|
|
}
|
|
|
|
const stage: Stage = {
|
|
id: 3,
|
|
name: 'Correspondencia uno a uno',
|
|
description: 'Asociar cantidades con números, emparejar grupos iguales, comparar más y menos.',
|
|
exercises,
|
|
}
|
|
|
|
export default stage
|