Zaktualizuj 'plant.py'

skomentowanie metody dodajacej i pobierajacej wspolrzedne
This commit is contained in:
Dominik Małyszka 2020-04-05 17:31:18 +00:00
parent 1665e01931
commit b1b3d505ff

View File

@ -22,14 +22,15 @@ class Plant:
def collect(self): def collect(self):
pass pass
#nadajemy współrzędne roślince ##to niepotrzebne, bo współrzedne beda w glebie
def add_coordinates(self, x, y): ##nadajemy współrzędne roślince
self._x = x ##def add_coordinates(self, x, y):
self._y = y ## self._x = x
## self._y = y
#pobieramy współrzędne roślinki ##pobieramy współrzędne roślinki
def get_coordinates(self): ##def get_coordinates(self):
return self._x, self._y ## return self._x, self._y
#pobieramy id roślinki #pobieramy id roślinki
def get_id(self): def get_id(self):