From 2658f77669e947af6be32df73c1ab7550f4c76ef Mon Sep 17 00:00:00 2001 From: Wojciech Kubicki Date: Mon, 25 Mar 2024 12:35:03 +0100 Subject: [PATCH] feat(tractor): update water level and add replenish functionality --- src/tractor.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tractor.py b/src/tractor.py index 0c21a9c9..5dd26c72 100644 --- a/src/tractor.py +++ b/src/tractor.py @@ -16,7 +16,8 @@ class Tractor(pygame.sprite.Sprite): x, y = 0, 0 self.rect.topleft = (x, y) - self.water = 200 + self.water = 50 + def draw(self, surface): surface.blit(self.image, self.rect) @@ -54,6 +55,9 @@ class Tractor(pygame.sprite.Sprite): self.move('up') if keys[pygame.K_DOWN]: self.move('down') + if keys[pygame.K_r]: + self.water = 50 + print(f"💧 replenished water level: {self.water} litres\n") def print_tile_type(self):