diff options
author | Viljami Ilola <+@hix.fi> | 2024-03-18 18:08:20 +0200 |
---|---|---|
committer | Viljami Ilola <+@hix.fi> | 2024-03-18 18:08:20 +0200 |
commit | 78704848d4459907a456044615714b59d4593b2f (patch) | |
tree | d56c8422793ff1c5b6554146980760d264a6a0fe /src/sliceitoff/field/field.py | |
parent | b219c4f736e6b98dd247064b362997576954f0ff (diff) |
stats, level_up, game_over
Diffstat (limited to 'src/sliceitoff/field/field.py')
-rw-r--r-- | src/sliceitoff/field/field.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sliceitoff/field/field.py b/src/sliceitoff/field/field.py index 5881ed9..161cfcd 100644 --- a/src/sliceitoff/field/field.py +++ b/src/sliceitoff/field/field.py @@ -3,6 +3,8 @@ import os import pygame from display import Scaling, INTERNAL_WIDTH, INTERNAL_HEIGHT +from stats import Stats + DEBUG = os.getenv("DEBUG") class FieldSprite(pygame.sprite.Sprite): @@ -42,7 +44,7 @@ class Field(): def update_area(self): """ calculates remaining area and remaining percentage """ self.area_current = sum( s.area[2]*s.area[3] for s in self.sprites ) - self.percentage = 100 * self.area_current // self.area_full + Stats.percent = 100 * self.area_current / self.area_full if DEBUG: print( f"FIELD: {self.area_full}/{self.area_current}, " |