Traktor/config.py

79 lines
1.6 KiB
Python
Raw Normal View History

2021-03-16 10:06:56 +01:00
#!/usr/bin/python3
import os
2021-03-16 10:06:56 +01:00
__all__ = (
2021-04-13 09:55:19 +02:00
'WIDTH', 'HEIGHT', 'FIELD_SIZE', 'TIME_OF_MOVING',
2021-03-16 10:06:56 +01:00
'VERTICAL_NUM_OF_FIELDS', 'HORIZONTAL_NUM_OF_FIELDS',
'FPS', 'CAPTION', 'RESOURCE_DIR', 'TRACTOR', 'PNG',
'SAND', 'CLAY', 'GRASS', 'CORN', 'SUNFLOWER',
2021-04-13 09:55:19 +02:00
'FIELD_TYPES', 'TIME_OF_GROWING', 'AMOUNT_OF_CROPS',
'M_GO_FORWARD', 'M_ROTATE_LEFT', 'M_ROTATE_RIGHT',
'A_SOW', 'A_HARVEST', 'A_HYDRATE', 'A_FERTILIZE', 'A_DO_NOTHING',
2021-04-27 21:40:59 +02:00
'D_NORTH', 'D_EAST', 'D_SOUTH', 'D_WEST',
'VALUE_OF_MOVEMENT', 'VALUE_OF_CROPS', 'VALUE_OF_PLANT',
'VALUE_OF_SAND', 'VALUE_OF_CLAY'
2021-03-16 10:06:56 +01:00
)
# Board settings:
VERTICAL_NUM_OF_FIELDS = 9
HORIZONTAL_NUM_OF_FIELDS = 12
2021-03-16 13:27:39 +01:00
FIELD_SIZE = 60
2021-03-16 10:06:56 +01:00
WIDTH = HORIZONTAL_NUM_OF_FIELDS * FIELD_SIZE
HEIGHT = VERTICAL_NUM_OF_FIELDS * FIELD_SIZE
# Other settings
FPS = 10
CAPTION = 'Tractor'
# Path
BASE_DIR = os.path.dirname(__file__)
RESOURCE_DIR = os.path.join(BASE_DIR, 'resources')
# Picture format
PNG = "png"
# Tractor settings
TRACTOR = 'tractor'
# Types of Fields
SAND = 'sand'
CLAY = 'clay'
GRASS = 'grass'
CORN = 'corn'
SUNFLOWER = 'sunflower'
FIELD_TYPES = (SAND, CLAY, GRASS, CORN, SUNFLOWER)
2021-04-13 09:55:19 +02:00
# Directions
2021-04-13 10:40:56 +02:00
D_NORTH = 0.0
D_EAST = 270.0
D_SOUTH = 180.0
D_WEST = 90.0
2021-04-13 09:55:19 +02:00
# Goal Test
AMOUNT_OF_CROPS = 5
# Movements:
M_GO_FORWARD = "go forward"
M_ROTATE_LEFT = "rotate left"
M_ROTATE_RIGHT = "rotate right"
# Actions:
A_SOW = "sow"
A_HARVEST = "harvest"
A_HYDRATE = "hydrate"
A_FERTILIZE = "fertilize"
A_DO_NOTHING = "do nothing"
2021-04-27 21:40:59 +02:00
# Costs movement and fields:
2021-04-27 22:30:25 +02:00
VALUE_OF_MOVEMENT = 4
2021-04-27 21:40:59 +02:00
VALUE_OF_CROPS = 1
VALUE_OF_PLANT = 3
VALUE_OF_SAND = 7
VALUE_OF_CLAY = 10
# Times
TIME_OF_GROWING = 2
2021-04-13 09:55:19 +02:00
TIME_OF_MOVING = 2