diff --git a/src/ects.py b/src/ects.py index e746c12..ea9319d 100644 --- a/src/ects.py +++ b/src/ects.py @@ -2,6 +2,7 @@ import pygame from src.settings import START_ECTS_VALUE, ECTS_UPDATE_INTERVAL + class ECTS: def __init__(self): # total amount of ECTS the player has at the beginning @@ -24,3 +25,9 @@ class ECTS: # beer increases amount of how much ECTS are earned per second def upgrade_rate(self, extra_ects): self.ects_per_second += extra_ects + + def is_over_balance(self, amount): + return self.ects_balance >= amount + + def decrease_balance(self, amount): + self.ects_balance -= amount