From 78f4c6f7a62d5a880cefed51ff34834b47a2c477 Mon Sep 17 00:00:00 2001 From: Louis Chmielewski <louis.chmielewski@icloud.com> Date: Sun, 17 Mar 2024 18:16:55 +0100 Subject: [PATCH] =?UTF-8?q?d=C3=A9but=20sont=5F4=5Fblocs=5Funiformes=5Fpro?= =?UTF-8?q?ches=20class=20bloc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .DS_Store | Bin 10244 -> 10244 bytes Projet/.DS_Store | Bin 6148 -> 6148 bytes Projet/src/bloc.py | 18 ++++++++++++++++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.DS_Store b/.DS_Store index 20ed3982cb89f32381cc4851d15b4d3a8c4eefd7..326440fc414c4a6b7b618de62449d46ba9aedee2 100644 GIT binary patch delta 146 zcmZn(XbIS$CJ>uf$H2hA!l1{H&XCDalAG`1l9ZF5#K6G7@qu^N$~BjdI-<&_;FT}P xFbq!4&n;j80rdx)n+4<<l}vXrFfgz&1TYja<TGS3q@r5Gz|b&v^ASM@F#v?rCj$Tg delta 146 zcmZn(XbIS$CJ>wG#=yY9!l1{H&XCDalAG`1l9ZF5#K6G7@%8bkX=^SYbwrg<!7E>o xVHlj8pIg8H0_p{un+4<<l}t1l7#P?X0vL)I@)@!iQc<m8U|?w7d_>Se3;^l_Clmkx diff --git a/Projet/.DS_Store b/Projet/.DS_Store index 8958a33e120a1f879db5114abbf82168b4d4fb33..a7665f9af89478bc2c51519131dfbf5860f29c35 100644 GIT binary patch delta 22 ecmZoMXffFEj*Ut6!{iTa5=;$qH*>N75&!^aW(cwX delta 22 dcmZoMXffFEj*Uqre)0!42_}Zt&0Ori1OQv>2Z#Uw diff --git a/Projet/src/bloc.py b/Projet/src/bloc.py index 09a0742..ae18af3 100755 --- a/Projet/src/bloc.py +++ b/Projet/src/bloc.py @@ -36,7 +36,7 @@ class Bloc: """ return self.image == other.image - def est_bloc_uniforme(): + def est_bloc_uniforme()->bool: """ Renvoie True si le bloc est un bloc uniforme Précondition : aucune @@ -47,7 +47,7 @@ class Bloc: return pixel_hl == pixel_lr - def est_bloc_non_uniforme(): + def est_bloc_non_uniforme()-> bool: """ Renvoie True si le bloc n'est pas uniforme, c'est à dire si il peut être divisé en 4 blocs @@ -58,6 +58,20 @@ class Bloc: """ return not(est_bloc_uniforme()) + def sont_4_blocs_uniformes_proches(bloc1: Bloc, bloc2: Bloc, bloc3: Bloc, bloc4: Bloc)-> bool: + """ + Renvoie True si les 4 blocs uniformes sont proches + Précondition : aucune + Exemple(s) : + $$$ + + """ + parametres = [bloc1, bloc2, bloc3, bloc4] + for i in parametres(1,len(parametres)-1): + + + + -- GitLab