Add CE2 homophones chapter (a/à, et/est, son/sont, on/ont)

Same directives as the CE1 chapter: 4 rules with a substitution test
each, 8 multiple-choice + 4 sentence corrections + 3 dictées per rule
(draft), 3 missions per rule, Piper audio for the 12 dictées.

21 missions don't fit on one map, so the world map now shows the
missions of the profile's school level (derived from the rule's level,
no data-format change), with a button letting a CE2 profile revisit the
CE1 map. Mission-position guard test now checks each level separately.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Denis Defolie
2026-10-11 21:58:16 +02:00
parent 233cc26452
commit aad229ef7b
113 changed files with 2814 additions and 31 deletions
+8 -1
View File
@@ -15,11 +15,18 @@ func test_unknown_rule_returns_empty_dictionary() -> void:
func test_missions_are_loaded_and_sorted() -> void:
var missions := ExerciseEngine.get_missions()
assert_eq(missions.size(), 9)
assert_eq(missions.size(), 21)
var ids: Array = missions.map(func(m: Dictionary) -> String: return m["mission_id"])
assert_eq(ids, ids.duplicate()) # trivialement vrai, documente l'ordre stable
assert_true(ids.has("mission_01_pre_des_mots"))
assert_true(ids.has("mission_09_rocher_qui_repete"))
assert_true(ids.has("mission_21_colline_echos"))
func test_missions_are_filtered_by_the_level_of_their_rule() -> void:
assert_eq(ExerciseEngine.get_missions_for_level("CE1").size(), 9)
assert_eq(ExerciseEngine.get_missions_for_level("CE2").size(), 12)
assert_eq(ExerciseEngine.get_missions_for_level("CM1").size(), 0)
func test_get_mission_returns_the_requested_mission() -> void: