IntelligentTractor/src/Field.py

31 lines
889 B
Python
Raw Permalink Normal View History

2023-03-26 14:20:58 +02:00
from pygame.sprite import Sprite
2023-05-25 18:11:06 +02:00
from src.Plant import Plant
2023-03-26 14:20:58 +02:00
class Field(Sprite):
def __init__(self, type, x, y, image, cost, hydration_level , soil,
2023-05-28 10:23:30 +02:00
fertilizer_degree, development_degree, plant_type, fertilizer_type, to_water, contain):
super().__init__()
2023-03-26 14:20:58 +02:00
self.type = type
self.x = x
self.y = y
self.position = (x, y)
2023-03-26 14:20:58 +02:00
self.image = image
self.cost = cost
self.hydration_level = hydration_level
self.soil = soil
self.fertilizer_degree = fertilizer_degree
self.development_degree = development_degree
self.plant_type = plant_type
self.fertilizer_type = fertilizer_type
self.to_water = to_water
2023-05-28 10:23:30 +02:00
self.contain = contain
2023-05-25 18:11:06 +02:00
2023-05-28 10:23:30 +02:00
def getContain(self):
return self.contain
def setContain(self,newPlant):
self.contain=newPlant
2023-05-25 18:11:06 +02:00
2023-03-26 14:20:58 +02:00