From 9494730ad34066ac29cd2bb52cda982312495738 Mon Sep 17 00:00:00 2001
From: DamienK <damien.kalck@etu.unistra.fr>
Date: Fri, 16 Dec 2022 12:39:12 +0100
Subject: [PATCH] =?UTF-8?q?=C3=A9quilibrage?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/Champs.py | 68 ++++++++++++++++++++-------------------------------
 src/Game.py   | 14 +++++------
 2 files changed, 34 insertions(+), 48 deletions(-)

diff --git a/src/Champs.py b/src/Champs.py
index 1697f2f..be2b11c 100644
--- a/src/Champs.py
+++ b/src/Champs.py
@@ -55,7 +55,7 @@ class Champs:
         }
         self.setInformation("Occupe" , "Champ non occupé")
         self.setInformation("Nom","Champ Vide ")
-        self.setInformation("coutEntretien","90€ coût d'entretien mensuel")
+        self.setInformation("coutEntretien","15€ coût d'entretien mensuel")
         self.setInformation("fane", "Pourcentage que la plante fanne : ")
         self.setInformation(hash('fane'), str(self.pourcentagePlanteFane)+' %')
         self.setInformation("status", self.image,True)
@@ -170,7 +170,7 @@ class Champs:
 Super class qui répresente un champs
 """
 class Buisson (Champs):
-    def __init__ (self, pos, prix = 10000):
+    def __init__ (self, pos, prix = 9000):
         super().__init__(0, 0, 0, pos, '../assets/Interface/buissonCadenas.png')
         self.prix = prix
         self.text = self.police.render("Champ disponible à l'achat : " + str(self.prix), False, (0,0,0))
@@ -192,39 +192,25 @@ class TerrainVide(Champs):
 
 
 class Houblon (Champs):
-    montantAchat = 250
-    montantVente = 600
     iconStatic = transformImage(pygame.image.load('../assets/Plantation/houblon.png'), *iconStaticSize)
-    textStatic = police.render('Houblon',False, (0,0,0))
-    textDescriptionStatic = police.render("Montant Achat :"+str(montantAchat),False,(0,0,0))
-    textDescriptionStatic2 = police.render("Montant Vente :"+str(montantVente),False,(0,0,0))
-
+    textStatic = police.render('Houblon',False, (255,255,255))
+    textDescriptionStatic = police.render("Houblon ça marche bien",False,(0,0,0))
+    montantAchat = 300
+    montantVente = 1200
     def __init__ (self, pos):
         super().__init__(0, 0, 0, pos,'../assets/Plantation/champ.png')
         self.text = self.police.render("Température : " + str(self.temperature), False, (0,0,0))
         self.zoomText = self.text
 
         self.imageChamp = transformImage(pygame.image.load('../assets/Plantation/crop1phase.png'), 120, 120)
-        self.descripteurPlante = {
         
-        }
-
-        self.imageSurfacePlante = {
-            
-        }
-
-        super.setInformation("Montant Achat",200)
-        super.setInformation("Montant Vente",800)
-        print("changement fait")
-
-
         
 class Ble (Champs):
     iconStatic = transformImage(pygame.image.load('../assets/Plantation/wheat.png'), *iconStaticSize)
-    textStatic = police.render('Ble',False, (0,0,0))
-    textDescriptionStatic = police.render("Ble sa marche bien",False,(0,0,0))
-    montantAchat = 250
-    montantVente = 800
+    textStatic = police.render('Ble',False, (255,255,255))
+    textDescriptionStatic = police.render("Ble ça marche bien",False,(0,0,0))
+    montantAchat = 300
+    montantVente = 1200
     def __init__ (self,pos):
         super().__init__(0,0,0,pos,'../assets/Plantation/champ.png')
         
@@ -232,10 +218,10 @@ class Ble (Champs):
 
 class Malt (Champs):
     iconStatic = transformImage(pygame.image.load('../assets/Plantation/malt.png'), *iconStaticSize)
-    textStatic = police.render('Malt',False, (0,0,0))
-    textDescriptionStatic = police.render("Malt sa marche bien",False,(0,0,0))
-    montantAchat = 300
-    montantVente = 800
+    textStatic = police.render('Malt',False, (255,255,255))
+    textDescriptionStatic = police.render("Malt ça marche bien",False,(0,0,0))
+    montantAchat = 400
+    montantVente = 1600
     def __init__ (self,pos):
         super().__init__(0,0,0,pos,'../assets/Plantation/champ.png')
         self.imageChamp = transformImage(pygame.image.load('../assets/Plantation/crop1phase.png'), 120, 120)
@@ -243,10 +229,10 @@ class Malt (Champs):
 
 class Chanvre(Champs):
     iconStatic = transformImage(pygame.image.load('../assets/Plantation/weed.png'), *iconStaticSize)
-    textStatic = police.render("Chanvre",False, (0,0,0))
+    textStatic = police.render("Chanvre",False, (255,255,255))
     textDescriptionStatic = police.render("Pour des spaces bières",False,(0,0,0))
     montantAchat = 1000
-    montantVente = 5000
+    montantVente = 4000
     def __init__ (self,pos):
         super().__init__(0,0,0,pos,'../assets//Plantation/champ.png')
         self.imageChamp = transformImage(pygame.image.load('../assets/Plantation/crop1phase.png'), 120, 120)
@@ -254,10 +240,10 @@ class Chanvre(Champs):
 
 class OrgeHiver(Champs):
     iconStatic = transformImage(pygame.image.load('../assets/Plantation/orge.png'), *iconStaticSize)
-    textStatic = police.render("Orge hiver",False, (0,0,0))
-    textDescriptionStatic = police.render("Orge hiver sa marche bien",False,(0,0,0))
-    montantAchat = 300
-    montantVente = 800
+    textStatic = police.render("Orge hiver",False, (255,255,255))
+    textDescriptionStatic = police.render("Orge hiver ça marche bien",False,(0,0,0))
+    montantAchat = 400
+    montantVente = 1600
     def __init__ (self,pos):
         super().__init__(0,0,0,pos,'../assets/Plantation/champ.png')
         self.imageChamp = transformImage(pygame.image.load('../assets/Plantation/crop1phase.png'), 120, 120)
@@ -265,10 +251,10 @@ class OrgeHiver(Champs):
 
 class OrgePrintemps(Champs):
     iconStatic = transformImage(pygame.image.load('../assets/Plantation/OrgePrintemps.png'), *iconStaticSize)
-    textStatic = police.render("Orge printemps",False, (0,0,0))
-    textDescriptionStatic = police.render("Orge printemps sa marche bien",False,(0,0,0))
+    textStatic = police.render("Orge printemps",False, (255,255,255))
+    textDescriptionStatic = police.render("Orge printemps ça marche bien",False,(0,0,0))
     montantAchat = 500
-    montantVente = 1000
+    montantVente = 2000
     def __init__ (self,pos):
         super().__init__(0,0,0,pos,'../assets/Plantation/champ.png')
         
@@ -277,10 +263,10 @@ class OrgePrintemps(Champs):
 
 class Seigle(Champs):
     iconStatic = transformImage(pygame.image.load('../assets/Plantation/seigle.png'), *iconStaticSize)
-    textStatic = police.render("Seigle",False, (0,0,0))
-    textDescriptionStatic = police.render("Seigle sa marche bien",False,(0,0,0))
+    textStatic = police.render("Seigle",False, (255,255,255))
+    textDescriptionStatic = police.render("Seigle ça marche bien",False,(0,0,0))
     montantAchat = 200
-    montantVente = 600
+    montantVente = 800
     def __init__ (self,pos):
         super().__init__(0,0,0,pos,'../assets/Plantation/champ.png')
         self.imageChamp = transformImage(pygame.image.load('../assets/Plantation/crop1phase.png'), 120, 120)
@@ -288,7 +274,7 @@ class Seigle(Champs):
 
 class Pesticide(Champs):
     iconStatic = transformImage(pygame.image.load('../assets/Plantation/pesticide.png'), *iconStaticSize)
-    textStatic = police.render("Pesticide",False, (0,0,0))
+    textStatic = police.render("Pesticide",False, (255,255,255))
     textDescriptionStatic = police.render("Pour tuer les insectes",False,(0,0,0))
     montantAchat = 200
     def __init__ (self,pos):
diff --git a/src/Game.py b/src/Game.py
index da051f9..343b98c 100644
--- a/src/Game.py
+++ b/src/Game.py
@@ -12,7 +12,7 @@ SAISONS = ["Printemps", "Été", "Automne", "Hiver"]
 #Défini la police 
 police = pygame.font.SysFont("roboto", 30)
 
-    """
+"""
     @nom = Game :  Class : Classe principale du jeu
     @param : pas de parametre
     @return : void
@@ -244,7 +244,7 @@ class Game:
                                         self.champs.append(newChamp)
                                         newChamp.setInformation("Occupe" ,"Champ occupé")
                                         newChamp.setInformation("Nom", "Champ contient "+ self.dragPlantation.__name__)
-                                        newChamp.setInformation("coutEntretien","90€ coût d'entretien mensuel")
+                                        newChamp.setInformation("coutEntretien","15€ coût d'entretien mensuel")
 
                                         self.champs.remove(champ)
                                         #Perdre l'argent
@@ -265,7 +265,7 @@ class Game:
                                         #Ajout des informations dans le rectangle information
                                         newBat.setInformation("Occupe", "Espace occupé") 
                                         newBat.setInformation("Nom","Emplacement pour"+str(self.dragBatiment.NameObjet))
-                                        newBat.setInformation("coutEntretien","117€ d'entretien mensuel ")
+                                        newBat.setInformation("coutEntretien","30€ d'entretien mensuel ")
                                         champ.showInfo(self.screen,self.recInformation,newBat.descripteurInfrastructure)
 
                                         #Perdre l'argent
@@ -437,7 +437,7 @@ class Game:
         self.buyFrame = self.frame
         self.money+= montant
         
-     """
+    """
     @nom = AideEtat : Fonction : Ajoute de l'argent
     @param : 
     @return : void
@@ -447,7 +447,7 @@ class Game:
     def AideEtat(self):
         self.moneyDefile(5000)
 
-     """
+    """
     @nom = ChangePourcentFanne : Fonction : Ajoute de l'argent
     @param : 
     @return : void
@@ -489,10 +489,10 @@ class Game:
         cout = 0
         # Entretien des batiments pendant 3 mois
         if self.nombreBatiments > 0:
-            cout += (-117 * self.nombreBatiments) * 3
+            cout += (-30 * self.nombreBatiments) * 3
 
         # Entretien des champs pendant 3 mois
         if self.nombreChamps > 0:
-            cout += (-90 * self.nombreChamps) * 3
+            cout += (-15 * self.nombreChamps) * 3
 
         self.moneyDefile(cout)
-- 
GitLab