summaryrefslogtreecommitdiff
path: root/src/sliceitoff/field/field.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/sliceitoff/field/field.py')
-rw-r--r--src/sliceitoff/field/field.py4
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}, "