From bc9aa8d7e6771937fdda669e468baf296546b515 Mon Sep 17 00:00:00 2001 From: trochas Date: Thu, 28 Nov 2024 10:38:43 +0100 Subject: [PATCH] correction fonction de compartiment servir() --- src/Compartiment.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Compartiment.java b/src/Compartiment.java index a3a4e11..9484f5d 100644 --- a/src/Compartiment.java +++ b/src/Compartiment.java @@ -7,12 +7,7 @@ public class Compartiment{ } synchronized void servir(int qte){ - if(qte>quantite_courant){ - - } - else{ - quantite_courant -= qte; - } + quantite_courant -= qte; } public int getQuantite(){