From dac2d370d2feb040751abb8fb7b14eaf50fa88ae Mon Sep 17 00:00:00 2001 From: Kinadinova Dariya <dariya.kinadinova.etu@115p4.fil.univ-lille.fr> Date: Wed, 27 Mar 2024 13:52:54 +0100 Subject: [PATCH] class block: divide_blocks --- projet/codes/Block.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/projet/codes/Block.py b/projet/codes/Block.py index 654b5bb..35e9dc1 100644 --- a/projet/codes/Block.py +++ b/projet/codes/Block.py @@ -29,6 +29,20 @@ class Block: """ colors = liste_col(self.image, (0, 0), (self.width-1, self.height-1)) return avg_col(colors) + + def divide_blocks(self): + """à_remplacer_par_ce_que_fait_la_fonction + + Précondition : + Exemple(s) : + $$$ + + """ + allblocks = [] + d = decouper(self.image) + for blocks in d: + allblocks.append(Block(blocks)) + return allblocks def is_uniform(self, coordinates: tuple()): """à_remplacer_par_ce_que_fait_la_fonction -- GitLab