From 329b3f16c9c6d3384a74dd457c0067169c7c7891 Mon Sep 17 00:00:00 2001
From: DamienK <damien.kalck@etu.unistra.fr>
Date: Fri, 16 Dec 2022 10:37:58 +0100
Subject: [PATCH] ps de conflit pls

---
 src/Champs.py | 14 +++++++-------
 src/Game.py   | 15 +++++++++------
 2 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/src/Champs.py b/src/Champs.py
index 89169de..f0b810f 100644
--- a/src/Champs.py
+++ b/src/Champs.py
@@ -145,7 +145,7 @@ class TerrainVide(Champs):
 class Houblon (Champs):
     iconStatic = transformImage(pygame.image.load('../assets/Plantation/houblon.png'), *iconStaticSize)
     textStatic = police.render('Houblon',False, (0,0,0))
-    textDescriptionStatic = police.render("Houblon sa marche bien",False,(0,0,0))
+    textDescriptionStatic = police.render("Houblon ça marche bien",False,(0,0,0))
     montantAchat = 250
     montantVente = 600
     def __init__ (self, pos):
@@ -159,7 +159,7 @@ class Houblon (Champs):
 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))
+    textDescriptionStatic = police.render("Ble ça marche bien",False,(0,0,0))
     montantAchat = 250
     montantVente = 800
     def __init__ (self,pos):
@@ -170,7 +170,7 @@ 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))
+    textDescriptionStatic = police.render("Malt ça marche bien",False,(0,0,0))
     montantAchat = 300
     montantVente = 800
     def __init__ (self,pos):
@@ -192,7 +192,7 @@ 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))
+    textDescriptionStatic = police.render("Orge hiver ça marche bien",False,(0,0,0))
     montantAchat = 300
     montantVente = 800
     def __init__ (self,pos):
@@ -203,7 +203,7 @@ 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))
+    textDescriptionStatic = police.render("Orge printemps ça marche bien",False,(0,0,0))
     montantAchat = 500
     montantVente = 1000
     def __init__ (self,pos):
@@ -215,7 +215,7 @@ 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))
+    textDescriptionStatic = police.render("Seigle ça marche bien",False,(0,0,0))
     montantAchat = 200
     montantVente = 600
     def __init__ (self,pos):
@@ -233,6 +233,6 @@ class Pesticide(Champs):
 
 #TODO : class Bussion,
 
-typePlantation = [Houblon,Ble,Malt,Chanvre,OrgeHiver,OrgePrintemps,Seigle,Pesticide]
+typePlantation = [Houblon,Ble,Malt,Chanvre,OrgePrintemps,OrgeHiver,Seigle,Pesticide]
     
         
\ No newline at end of file
diff --git a/src/Game.py b/src/Game.py
index bd57a40..9b8d185 100644
--- a/src/Game.py
+++ b/src/Game.py
@@ -102,26 +102,29 @@ class Game:
             self.recTourSuivant.y+ (self.recTourSuivant.h - self.tourSuivantModif.get_height())/2))
 
             for i,c in enumerate(typePlantation):
-                x = self.rectPlantation.x + ( 0 if i%2 else 170) 
-                y = self.rectPlantation.y + (i//2) * 140
+                x = self.rectPlantation.x + ( 0 if i%2 else 170)
+                y = self.rectPlantation.y + (i//2) * self.rectPlantationimage.get_height()/4
+
+                # Redimensionner l'image
+                c.iconStatic = transformImage(c.iconStatic, self.rectPlantationimage.get_width()/3.5, self.rectPlantationimage.get_height()/5.5)
+
                 r = pygame.rect.Rect(x,y,c.iconStatic.get_width(),c.iconStatic.get_height()+ 20 )
                 self.screen.blit(c.textStatic, (x,y))
-                self.screen.blit(c.iconStatic,(x,y+20 ))
+                self.screen.blit(c.iconStatic,(x,y+c.textStatic.get_height() ))
                 if ( (r.collidepoint(pygame.mouse.get_pos()))):
                     pygame.draw.rect(self.screen,(138, 227, 237), r,1)
                     self.screen.blit(c.textDescriptionStatic,(self.recInformation.x,self.recInformation.y))
-                    #self.screen.blit(self.text,(screen.get_width()*0.85,screen.get_height()*0.18))
         
                 
                 
             #Onglet batiment 
             self.screen.blit(self.rectBatimentimage,(self.temps.getImageSaison().get_width(),self.screen.get_height() - self.temps.getImageSaison().get_height()))
             for i,c in enumerate(typeBatiment):
-                x = self.recBatiment.x + i* (c.iconStatic.get_width() + 30) +50
+                x = self.recBatiment.x + i* self.rectBatimentimage.get_width() / 5.75
                 y = self.recBatiment.y + 50
                 r = pygame.rect.Rect(x,y,c.iconStatic.get_width() + 20 ,c.iconStatic.get_height()+ 30 )
                 self.screen.blit(c.textStatic, (x,y))
-                self.screen.blit(c.iconStatic,(x,y + 30))
+                self.screen.blit(c.iconStatic,(x,y + c.textStatic.get_height()))
                 if ( (r.collidepoint(pygame.mouse.get_pos()))):
                     pygame.draw.rect(self.screen,(138, 227, 237), r,1)
                     self.screen.blit(c.textDescriptionStatic,(self.recInformation.x,self.recInformation.y))
-- 
GitLab