Skip to content
Snippets Groups Projects
Commit 3ad634fb authored by CHOPIN Lou-anne's avatar CHOPIN Lou-anne
Browse files

question 7

parent e19fc654
No related branches found
No related tags found
No related merge requests found
...@@ -32,12 +32,20 @@ class TabletteChocolat : ...@@ -32,12 +32,20 @@ class TabletteChocolat :
for y in range(j, self.n): for y in range(j, self.n):
self.tablette[x][y] = 0 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) t = TabletteChocolat(3, 4)
print(t) print(t)
g = t.coups_possibles() g = t.coups_possibles()
list(g) list(g)
print (g) print (g)
plt.axis('off')
plt.show()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment