This commit is contained in:
v7eZ3t 2021-03-29 20:30:21 +02:00
parent a5d9403a07
commit 3fe181efa0
4 changed files with 3 additions and 8 deletions

View File

@ -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

View File

@ -29,7 +29,7 @@ TRACTOR_WIDTH = TILE_SIZE
TRACTOR_HEIGHT = TILE_SIZE
#FRAMES PER SECOND
FPS = 100
FPS = 5

View File

@ -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

View File

@ -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]