2023-03-07 12:28:13 +01:00
|
|
|
import pygame
|
2023-03-19 21:00:49 +01:00
|
|
|
import sys
|
2023-03-07 13:00:35 +01:00
|
|
|
import tractor
|
2023-03-19 21:00:49 +01:00
|
|
|
import src.screen as screen
|
|
|
|
import src.plant as plant
|
|
|
|
from src.Tractor import Tractor as ractor2
|
|
|
|
#import src.tractor as tractor2
|
2023-03-07 12:28:13 +01:00
|
|
|
|
2023-03-15 19:58:49 +01:00
|
|
|
# pygame initialization
|
2023-03-07 12:28:13 +01:00
|
|
|
pygame.init()
|
2023-03-19 21:00:49 +01:00
|
|
|
pygame.mouse.set_visible(False)
|
|
|
|
|
|
|
|
# #new tractor sprite - todo
|
|
|
|
# tr=tractor2('oil','manual',36,36)
|
|
|
|
# tr_group = pygame.sprite.Group()
|
|
|
|
# tr_group.add()
|
2023-03-07 12:28:13 +01:00
|
|
|
|
2023-03-15 19:58:49 +01:00
|
|
|
# creating agent
|
2023-03-07 13:00:35 +01:00
|
|
|
myTractor = tractor.Tractor
|
2023-03-15 19:58:49 +01:00
|
|
|
|
2023-03-19 21:00:49 +01:00
|
|
|
#if __name__ == "__main__":
|
|
|
|
running = True
|
2023-03-07 12:28:13 +01:00
|
|
|
|
2023-03-19 21:00:49 +01:00
|
|
|
while running:
|
|
|
|
for event in pygame.event.get():
|
|
|
|
if event.type == pygame.QUIT:
|
|
|
|
running = False
|
|
|
|
pygame.quit()
|
|
|
|
sys.exit()
|
|
|
|
# defines agent movement
|
|
|
|
tractor.movement(myTractor)
|
|
|
|
# screen visualisation
|
|
|
|
screen.set_screen(myTractor)
|
|
|
|
|
|
|
|
#pygame.quit()
|