From 3fe181efa0c9cf6c89d0cdc482fcdee9655e9368 Mon Sep 17 00:00:00 2001 From: v7eZ3t Date: Mon, 29 Mar 2021 20:30:21 +0200 Subject: [PATCH] v 1.23 --- Tractor.py | 3 +-- constants.py | 2 +- driving.py | 2 +- main.py | 4 ---- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/Tractor.py b/Tractor.py index abd115a..c39fbd7 100644 --- a/Tractor.py +++ b/Tractor.py @@ -35,7 +35,7 @@ class Tractor: @hitch.setter def hitch(self, hitch): - if hitch == "Tillage unit" or hitch == "Crop Trailer" or isinstance(hitch, TillageUnit) or hitch == "Nothing": + if hitch == "Crop Trailer" or isinstance(hitch, TillageUnit) or hitch == "Nothing": self.__hitch = hitch @property @@ -78,7 +78,6 @@ class Tractor: self.__engineWorking = False def drive(self, direction): - mRange = 1 if direction == "UP" and self.vertical_index > 0: self.__vertical_index += - mRange diff --git a/constants.py b/constants.py index 26cd44f..a0d4a4d 100644 --- a/constants.py +++ b/constants.py @@ -29,7 +29,7 @@ TRACTOR_WIDTH = TILE_SIZE TRACTOR_HEIGHT = TILE_SIZE #FRAMES PER SECOND -FPS = 100 +FPS = 5 diff --git a/driving.py b/driving.py index e0e3d64..81071fb 100644 --- a/driving.py +++ b/driving.py @@ -20,7 +20,7 @@ def manualTurning(event, tractor): elif event.key == pygame.K_DOWN and tractor.vertical_index < VERTICAL_TILES_NUMBER - 1: direction = "DOWN" - tractor.drive(direction) + # tractor.drive(direction) return direction diff --git a/main.py b/main.py index ca4f5b6..1d5d868 100644 --- a/main.py +++ b/main.py @@ -48,8 +48,6 @@ while working: if hitchCounter == 0: tractor.hitch = "Crop Trailer" if hitchCounter == 1: - print(type(tillageUnit)) - print(isinstance(tillageUnit, TillageUnit)) tractor.hitch = tillageUnit if hitchCounter == 2: tractor.hitch = "Nothing" @@ -71,8 +69,6 @@ while working: direction = driving.manualTurning(event, tractor) - - print(tractor.horizontal_index, " ", tractor.vertical_index) field = board[tractor.horizontal_index][tractor.vertical_index]