Initial CookieCode MVP

This commit is contained in:
2026-07-21 22:12:43 +02:00
commit 5a388d3d60
10 changed files with 1266 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
-- Script simple en Lua pour afficher une recette de cuisine
local recette = {
nom = "Omelette nature",
personnes = 1,
ingredients = {
"2 oeufs",
"1 pincee de sel",
"1 pincee de poivre",
"1 noisette de beurre"
},
etapes = {
"Casser les oeufs dans un bol.",
"Ajouter le sel et le poivre, puis battre avec une fourchette.",
"Faire fondre le beurre dans une poele chaude.",
"Verser les oeufs battus dans la poele.",
"Cuire 2 a 3 minutes, puis servir chaud."
}
}
local function afficher_liste(titre, elements)
print(titre)
for index, element in ipairs(elements) do
print(index .. ". " .. element)
end
print("")
end
print("=== Recette de cuisine ===")
print("Nom : " .. recette.nom)
print("Pour : " .. recette.personnes .. " personne")
print("")
afficher_liste("Ingredients :", recette.ingredients)
afficher_liste("Etapes :", recette.etapes)
print("Bon appetit !")