Skip to content
Snippets Groups Projects
Commit 91cfddea authored by Fares_AZOUAOUI's avatar Fares_AZOUAOUI
Browse files

question 5 + doctest

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