v 1.23
This commit is contained in:
parent
a5d9403a07
commit
3fe181efa0
@ -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
|
||||
|
@ -29,7 +29,7 @@ TRACTOR_WIDTH = TILE_SIZE
|
||||
TRACTOR_HEIGHT = TILE_SIZE
|
||||
|
||||
#FRAMES PER SECOND
|
||||
FPS = 100
|
||||
FPS = 5
|
||||
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
4
main.py
4
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]
|
||||
|
Loading…
Reference in New Issue
Block a user