From 15ebaf64238b8e4edaa99491b4e1e46a3c0dc5d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Ma=C5=82yszka?= Date: Sun, 5 Apr 2020 17:37:40 +0000 Subject: [PATCH] Zaktualizuj 'plant.py' zmiana metody get_coordinates --- plant.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/plant.py b/plant.py index 776c94a..4cdfb3b 100644 --- a/plant.py +++ b/plant.py @@ -22,15 +22,11 @@ class Plant: def collect(self): pass - ##to niepotrzebne, bo współrzedne beda w glebie - ##nadajemy współrzędne roślince - ##def add_coordinates(self, x, y): - ## self._x = x - ## self._y = y - - ##pobieramy współrzędne roślinki - ##def get_coordinates(self): - ## return self._x, self._y + #pobieramy współrzędne roślinki + def get_coordinates(self): + if self.have_soil(): + a = self.get_soil() + a.get_coordinates(self) #get coordinates bedzie metodą w glebie #pobieramy id roślinki def get_id(self): @@ -58,4 +54,3 @@ class Plant: -