2020-06-29 10:59:56 +02:00
|
|
|
from config import *
|
|
|
|
|
|
|
|
|
2020-06-17 21:38:13 +02:00
|
|
|
class Tile:
|
2020-06-29 10:59:56 +02:00
|
|
|
def __init__(self, a, b, pos, parent=None):
|
2020-06-17 21:38:13 +02:00
|
|
|
self.ground = a
|
|
|
|
self.object = b
|
2020-06-29 10:59:56 +02:00
|
|
|
self.pos = pos
|
|
|
|
self.x = self.pos[0]
|
|
|
|
self.y = self.pos[1]
|
|
|
|
self.w = 100
|
|
|
|
self.wu = 0
|
|
|
|
|
2020-06-29 13:51:23 +02:00
|
|
|
self.f = "OK"
|
|
|
|
|
2020-06-29 10:59:56 +02:00
|
|
|
def water_usage(self):
|
|
|
|
if self.object == rose:
|
|
|
|
self.wu = 30
|
|
|
|
elif self.object == tulip:
|
|
|
|
self.wu = 10
|
|
|
|
elif self.object == orchid:
|
|
|
|
self.wu = 20
|
|
|
|
elif self.object == sunflower:
|
|
|
|
self.wu = 40
|