diff --git a/main.py b/main.py index f9511f015659edd14b597d8d39875fd15f675b87..9a323a9d31c3cd52839836edc4759adb0c0a018d 100644 --- a/main.py +++ b/main.py @@ -1,5 +1,14 @@ class TabletteChocolat: def __init__(self, m, n): + """ + constructeur + + + Raises: + TypeError: si m n'est pas entier + TypeError: si n n'est pas entier + """ + if (type(m)!=int): raise TypeError("m n'est pas entier") elif(type(n)!=int): @@ -30,7 +39,12 @@ class TabletteChocolat: return TabletteChocolat(self.m -i, self.n -j) def plot(self): - pass + x = [] + y = [] + plt.fill(x,y) + plt.gca().set_aspect('equal') + plt.axis('off') + plt.show() def demander_coup(self): rep = input("coup des lignes (l) ou colonnes (c)") @@ -73,6 +87,4 @@ def jouer(m,n): if __name__ == "__main__": import doctest doctest.testmod() - jouer(3,4) - - [(1,i) for i in range(7)] \ No newline at end of file + jouer(3,4) \ No newline at end of file