From 1e3b935c43d9aa6b4a63ca34d56c69eeb350577d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kinga=20Jagodzi=C5=84ska?= Date: Tue, 28 Apr 2020 19:43:27 +0000 Subject: [PATCH] Zaktualizuj 'Traktorek/Tractor.py' --- Traktorek/Tractor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Traktorek/Tractor.py b/Traktorek/Tractor.py index e1a5111..318b7e4 100644 --- a/Traktorek/Tractor.py +++ b/Traktorek/Tractor.py @@ -24,7 +24,6 @@ class Tractor(object): #ruszanie siÄ™ self.road = self.algo(0, 24) - # obecne pole def tick(self): @@ -32,7 +31,9 @@ class Tractor(object): # input if pygame.key.get_pressed()[pygame.K_SPACE]: + # obecne pole self.pole = self.pos.y // 144 * 5 + self.pos.x // 144 + if self.road[0] == self.pole + 1: self.pos.x = self.pos.x + 144 elif self.road[0] == self.pole - 1: