]> git.ayabusa.dev Git - a-la-carte.git/commitdiff
ajout de du squelette de la classe assiette
authorayabusa <lebgpub@gmail.com>
Mon, 23 Dec 2024 16:48:56 +0000 (17:48 +0100)
committerayabusa <lebgpub@gmail.com>
Mon, 23 Dec 2024 16:48:56 +0000 (17:48 +0100)
src/game.py

index 0f6144e73c0f8caa46c9fdcb6d40dca1ebe70ec1..14f3772856aaf5cf8adbacf3e8a13a4e52cac634 100644 (file)
@@ -58,10 +58,11 @@ class Ingredient:
     def __init__(self, i_nom):
         self.i_nom = i_nom
 
-class Plat:
-    def __init__(self, p_type, p_ingredients):
-        self.p_type=p_type
-        self.p_ingredients=p_ingredients
+class Assiette:
+    def __init__(self, a_ingredients=None):
+        self.a_ingredients = a_ingredients
+    def render(self, x, y, multiplier):
+        pass
 
 class Player:
     def __init__(self, game: object, x:int, y:int) -> None:
@@ -218,7 +219,8 @@ class Game:
     def recup_ingredient(self, elx:int,ely:int)->Ingredient:
         el=self.map[ely][elx]
         if type(el)!=tuple: 
-            if el==6: return Ingredient("oignon")
+            if el==5: return Assiette()
+            elif el==6: return Ingredient("oignon")
             elif el==7: return Ingredient("salade")
             elif el==8: return Ingredient("steak")
             elif el==9: return Ingredient("pain")