Add challenge feedback API

This commit is contained in:
2026-07-21 22:29:22 +02:00
parent 5a388d3d60
commit f4fea7324a
7 changed files with 500 additions and 6 deletions
+11 -1
View File
@@ -3,7 +3,7 @@ CookieCode.configurer({
afficherNotions: true,
});
CookieCode.recette("Cookie au chocolat")
const recette = CookieCode.recette("Cookie au chocolat")
.prendre("farine", 200, "g")
.prendre("sucre", 100, "g")
.prendre("chocolat", 150, "g")
@@ -17,3 +17,13 @@ CookieCode.recette("Cookie au chocolat")
})
.cuire(12, "minutes")
.servir();
const defi = CookieCode.defi("Cookie avec boucle", {
ingredientsMinimum: 3,
actionsObligatoires: ["melanger", "cuire", "servir"],
boucleObligatoire: true,
terminerParServir: true,
interdireErreurs: true
});
console.log(CookieCode.verifier(recette, defi).toText());