master #1
9
field.py
9
field.py
@ -24,10 +24,11 @@ class Field(pygame.sprite.Sprite):
|
|||||||
self.position = [row, column]
|
self.position = [row, column]
|
||||||
self.hydration = 0
|
self.hydration = 0
|
||||||
self.planted = 0
|
self.planted = 0
|
||||||
self.ferility = 1
|
self.fertility = 1
|
||||||
|
self.tractor_there = False
|
||||||
|
|
||||||
def hydrate(self):
|
def hydrate(self):
|
||||||
if self.field_type == "soil" and self.hydration <= 4:
|
if self.field_type == "soil" and self.hydration <= 5:
|
||||||
self.hydration += 1
|
self.hydration += 1
|
||||||
if self.hydration == 0:
|
if self.hydration == 0:
|
||||||
self.surf.fill(BROWN0)
|
self.surf.fill(BROWN0)
|
||||||
@ -37,7 +38,7 @@ class Field(pygame.sprite.Sprite):
|
|||||||
self.surf.fill(BROWN2)
|
self.surf.fill(BROWN2)
|
||||||
if self.hydration == 3:
|
if self.hydration == 3:
|
||||||
self.surf.fill(BROWN3)
|
self.surf.fill(BROWN3)
|
||||||
if self.hydration == 4:
|
if self.hydration == 4 or self.hydration == 5:
|
||||||
self.surf.fill(BROWN4)
|
self.surf.fill(BROWN4)
|
||||||
|
|
||||||
def dehydrate(self):
|
def dehydrate(self):
|
||||||
@ -51,7 +52,7 @@ class Field(pygame.sprite.Sprite):
|
|||||||
self.surf.fill(BROWN2)
|
self.surf.fill(BROWN2)
|
||||||
if self.hydration == 3:
|
if self.hydration == 3:
|
||||||
self.surf.fill(BROWN3)
|
self.surf.fill(BROWN3)
|
||||||
if self.hydration == 4:
|
if self.hydration == 4 or self.hydration == 5:
|
||||||
self.surf.fill(BROWN4)
|
self.surf.fill(BROWN4)
|
||||||
|
|
||||||
def free(self):
|
def free(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user