2021-03-29 20:51:47 +02:00
|
|
|
from drawUI import *
|
2021-03-29 02:19:55 +02:00
|
|
|
import pygame
|
|
|
|
|
|
|
|
|
2021-04-13 17:52:27 +02:00
|
|
|
# def autodrive(tractor, direction, comeback):
|
|
|
|
# if tractor.autodrive:
|
|
|
|
# if not comeback:
|
|
|
|
# if direction == "RIGHT" and tractor.horizontal_index == HORIZONTAL_TILES_NUMBER - 1:
|
|
|
|
# direction = "DOWN"
|
|
|
|
# elif direction == "DOWN" and tractor.horizontal_index == HORIZONTAL_TILES_NUMBER - 1:
|
|
|
|
# direction = "LEFT"
|
|
|
|
# elif direction == "LEFT" and tractor.horizontal_index == 0:
|
|
|
|
# direction = "DOWN"
|
|
|
|
# elif direction == "DOWN" and tractor.horizontal_index == 0:
|
|
|
|
# direction = "RIGHT"
|
|
|
|
# else:
|
|
|
|
# direction = "UP"
|
|
|
|
# return direction
|
|
|
|
|
|
|
|
#
|
|
|
|
# def isComebackTime(tractor, direction, comeback):
|
|
|
|
# if tractor.vertical_index == 5 and tractor.horizontal_index == 0:
|
|
|
|
# comeback = True
|
|
|
|
# print(comeback)
|
|
|
|
# direction = "UP"
|
|
|
|
# if tractor.vertical_index == 0 and tractor.horizontal_index == 0:
|
|
|
|
# comeback = False
|
|
|
|
# print(comeback)
|
|
|
|
# direction = "RIGHT"
|
|
|
|
# return comeback, direction
|