Intelligent_Tractor/config.py
Szymon Komosinski 5a40f4eb81 First commit
2020-06-17 21:38:13 +02:00

53 lines
1.4 KiB
Python

import pygame as pg
import numpy as np
screen_height = 560
screen_width = 700
tile_size = 80
screen = pg.display.set_mode([screen_width, screen_height])
# agent
agent_img = pg.image.load('tractor.png').convert()
# background
road = 0
ground = 1
bg_textures = {
road: pg.image.load('road.png').convert(),
ground: pg.image.load('ground.png').convert()}
background = np.array([[1, 1, 1, 0, 1, 1, 1],
[1, 1, 1, 0, 1, 1, 1],
[1, 1, 1, 0, 1, 1, 1],
[0, 0, 0, 0, 0, 0, 0],
[1, 1, 1, 0, 1, 1, 1],
[1, 1, 1, 0, 1, 1, 1],
[1, 1, 1, 0, 1, 1, 1]])
# objects
rose = 2
tulip = 3
orchid = 4
sunflower = 5
barn = 6
disease = 7
ob_textures = {
0: pg.image.load('none.png').convert_alpha(),
rose: pg.image.load('rose.png').convert_alpha(),
tulip: pg.image.load('tulip.png').convert_alpha(),
orchid: pg.image.load('orchid.png').convert_alpha(),
sunflower: pg.image.load('sunflower.png').convert_alpha(),
barn: pg.image.load('barn.png').convert(),
disease: pg.image.load('disease.png').convert_alpha()}
objects = np.array([[2, 2, 2, 0, 3, 3, 3],
[2, 2, 2, 0, 3, 3, 3],
[2, 2, 2, 0, 3, 3, 3],
[0, 0, 0, 6, 0, 0, 0],
[4, 4, 4, 0, 5, 5, 5],
[4, 4, 4, 0, 5, 5, 5],
[4, 4, 4, 0, 5, 5, 5]])