diff --git a/main.py b/main.py index 85dbc37cc98ffd70201b0db49ae09f4768f9834e..d92f25dff21eb356aaffbce55afd5ec9e78b77ff 100644 --- a/main.py +++ b/main.py @@ -22,10 +22,14 @@ class TabletteChocolat: def est_possible(self, i, j): return (i, j) in self.coups_possibles() + def coupe(self, i, j): + return TabletteChocolat(self.m - i, self.n - j) + # Programme principal t = TabletteChocolat(5, 2) print(t) TabletteChocolat(3, 4) print(t.coups_possibles()) -print(t.est_possible(0, 1)) \ No newline at end of file +print(t.est_possible(0, 1)) +print(t.coupe(3, 1)) \ No newline at end of file