diff --git a/main.py b/main.py index 267eceee161071e3c2f81e0957df1b18e206d57f..aa3c730248e7b6687b5e1ef8ee89832b14e35d29 100644 --- a/main.py +++ b/main.py @@ -11,8 +11,17 @@ class TabletteChocolat: def __repr__(self): return str(self) + def coups_possibles(self): + l = [] + for i in range(self.m): + for j in range(self.n): + if (i == 0 or j == 0) and (i, j) != (0, 0): + l.append(tuple([i, j])) + return l + # Programme principal -t = TabletteChocolat(1, 2) +t = TabletteChocolat(5, 2) print(t) -TabletteChocolat(3, 4) \ No newline at end of file +TabletteChocolat(3, 4) +print(t.coups_possibles()) \ No newline at end of file