diff --git a/main.py b/main.py index ca14544bc5da7003311def04ab43474204456bd2..9b248bd783a92a897829dd3aa7277180d638d199 100644 --- a/main.py +++ b/main.py @@ -1,4 +1,4 @@ - +from itertools import chain class TabletteChocolat : def __init__(self, m:int, n:int): @@ -24,6 +24,12 @@ class TabletteChocolat : resultat.append(0, i) return chain(resultat) + def est_possible(self, i, j) : + '''cette méthode prend en paramètres un couple i et j, les coordonées du carreau, et revoie si le coup en ces coordonnées est possible''' + return couple in list(self.coups_possibles()) + + +