diff --git a/main.py b/main.py index ca22bb7d2818eecb3cf8ccad52bc8dd57a71cfc6..b660f97c2e6ce239dc88711b173a6bc80ca6e8b9 100644 --- a/main.py +++ b/main.py @@ -1,4 +1,5 @@ from itertools import chain +import matplotlib.pyplot as plt class TabletteChocolat: def __init__(self, m, n): @@ -24,6 +25,20 @@ class TabletteChocolat: return ("ce coup est possible") else: return("ce coup est impossible") + # def coupe(self,i,j): + # g=TabletteChocolat.coups_possibles(self) + # for k in range(1,self.m): + # m1=max(g[k](0)) + def plot(self): + plt.plot(self.n,self.m) + for k in range(self.m*self.n): + plt.fill((0,0),(self.n,self.m)) + plt.gca().set_aspect('equal') + plt.axis('off') + plt.show() + return + +