From 2b0564c308296aa03d7d3aa4d5b719ae6a1fffb4 Mon Sep 17 00:00:00 2001 From: Melissa Belkacemi <melissa.belkacemi.etu@univ-lille.fr> Date: Sun, 31 Mar 2024 22:39:23 +0200 Subject: [PATCH] Update bloc.py --- PJ/bloc.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/PJ/bloc.py b/PJ/bloc.py index 0f998ca..dc75b51 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 -- GitLab