inteligentny-traktor/classes.py

39 lines
1.3 KiB
Python
Raw Normal View History

2023-04-21 06:30:54 +02:00
class Field:
def __init__(self, fieldType, plantType, isWet, wetTime, isFertilized, fertilizedTime):
2023-06-15 14:03:24 +02:00
self.fieldType = fieldType # good/bad
self.plantType = plantType # wheat/carrot/cabbage
self.isWet = isWet # yes/no
self.wetTime = wetTime # number
self.isFertilized = isFertilized # yes/no
self.fertilizedTime = fertilizedTime # number
2023-04-21 06:30:54 +02:00
2023-06-26 21:03:39 +02:00
2023-04-21 06:30:54 +02:00
class Plant:
def __init__(self, plantType, growthState):
self.plantType = plantType # wheat/carrot/cabbage
self.growthState = growthState # growing/grown
class Fertilizer:
def __init__(self, fertilizerType):
self.fertilizerType = fertilizerType # wheat/carrot/cabbage
class Player:
x = 0
y = 0
2023-06-15 14:03:24 +02:00
rotation = 0
2023-06-26 21:03:39 +02:00
class Watering:
def __init__(self, rain, planted, temperature, sunny, snowy, moist, rotten, dayTime ):
self.rain = rain # yes/no
self.planted = planted # yes/no
self.temperature = temperature # good/bad
self.sunny = sunny
self.snowy = snowy # yes/no
self.moist = moist # yes/no
self.rotten = rotten # yes/no
self.dayTime = dayTime # 1 2 3 4