Skip to content
Snippets Groups Projects
Commit 2b0564c3 authored by Melissa Belkacemi's avatar Melissa Belkacemi
Browse files

Update bloc.py

parent a62f5d2c
Branches
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment