Reprezentacja_wiedzy #1
@ -13,7 +13,7 @@ class Plant:
|
|||||||
if (water >= self.water_requirements) and (nutrients >= self.nutrients_requirements):
|
if (water >= self.water_requirements) and (nutrients >= self.nutrients_requirements):
|
||||||
i = random.randint(5, 12)
|
i = random.randint(5, 12)
|
||||||
if self.growth_level+i > 100:
|
if self.growth_level+i > 100:
|
||||||
i = self.growth_level - 100
|
i = 100 - self.growth_level
|
||||||
self.growth_level += i
|
self.growth_level += i
|
||||||
|
|
||||||
# more properties
|
# more properties
|
||||||
|
Loading…
Reference in New Issue
Block a user