diff --git a/main.py b/main.py index 7c18079185930f9edec9806db95c8f04919364c1..dd3366689f6fcac16c04ba9178f0992b19b21565 100644 --- a/main.py +++ b/main.py @@ -32,12 +32,20 @@ class TabletteChocolat : for y in range(j, self.n): self.tablette[x][y] = 0 + def plot(self): + plt.gca().set_aspect('equal') + for i in range(self.m): + for j in range(self.n): + if self.tablette[i][j] == 1 : + plt.fill([i, i+1, i+1, i], [j, j, j+1, j+1], colors = '#D5B799') + t = TabletteChocolat(3, 4) print(t) g = t.coups_possibles() list(g) print (g) - +plt.axis('off') +plt.show()