inteligentny-traktor/classes.py

39 lines
1.3 KiB
Python

class Field:
def __init__(self, fieldType, plantType, isWet, wetTime, isFertilized, fertilizedTime):
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
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
rotation = 0
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