Add challenge feedback API
This commit is contained in:
+11
-1
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user