diff --git a/PJ/bloc.py b/PJ/bloc.py index 0f998caeae4c2f11be2a03efec14e6f87fb69f48..dc75b516cbf6335f2f7af607f85d6f83441e167c 100644 --- a/PJ/bloc.py +++ b/PJ/bloc.py @@ -36,6 +36,17 @@ class Bloc: def sont_proches(c1:tuple[int,int,int],c2:tuple[int,int,int],c3:tuple[int,int,int],c4:tuple[int,int,int]) ->bool: """Renvoie True si les couleurs des 4 blocs sont proches + Précondition : les couleurs sont correctes + Exemple(s) : + $$$ b1=Bloc((1,2,3),(0,0),(1,1)) + $$$ b2=Bloc((0,2,3),(2,0),(3,1)) + $$$ b3=Bloc((0,0,3),(0,2),(1,3)) + $$$ b4=Bloc((10,123,34),(2,2),(3,3)) + $$$ b5=Bloc((0,1,3),(2,2),(3,3)) + $$$ b1.sont_proches(b2,b3,b4) + False + $$$ b1.sont_proches(b2,b3,b5) + True """ c1=self.couleur