basic_agent
This commit is contained in:
parent
9a4113fec1
commit
ba6ad75b97
12
Board.py
Normal file
12
Board.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import random
|
||||||
|
from Main.constants import *
|
||||||
|
|
||||||
|
board = []
|
||||||
|
|
||||||
|
|
||||||
|
def generate():
|
||||||
|
for i in range(int(HORIZONTAL_TILES_NUMBER)):
|
||||||
|
board.append([random.randint(0, 3)])
|
||||||
|
for j in range(int(VERTICAL_TILES_NUMBER)):
|
||||||
|
board[i].append(random.randint(0, 3))
|
||||||
|
return board
|
37
constants.py
Normal file
37
constants.py
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#constants
|
||||||
|
|
||||||
|
# display size in pixels
|
||||||
|
DISPLAY_SIZE_HORIZONTAL = 600
|
||||||
|
DISPLAY_SIZE_VERTICAL = 600
|
||||||
|
|
||||||
|
#TILE DIVIDER
|
||||||
|
TILE_DIVIDER = 100
|
||||||
|
|
||||||
|
# number of tiles
|
||||||
|
HORIZONTAL_TILES_NUMBER = DISPLAY_SIZE_HORIZONTAL/TILE_DIVIDER
|
||||||
|
VERTICAL_TILES_NUMBER = DISPLAY_SIZE_VERTICAL/TILE_DIVIDER
|
||||||
|
|
||||||
|
#TILE_SIZE
|
||||||
|
TILE_SIZE = DISPLAY_SIZE_HORIZONTAL/HORIZONTAL_TILES_NUMBER
|
||||||
|
|
||||||
|
#colors
|
||||||
|
WHITE = (255, 255, 255) #SUPER UPRAWA
|
||||||
|
BLACK = (0, 0, 0)
|
||||||
|
RED = (255, 0, 0) #DO ZASIANIA
|
||||||
|
YELLOW = (255, 255, 0) #DO PODLANIA
|
||||||
|
GREEN = (0, 255, 0) #DO SCIECIA
|
||||||
|
|
||||||
|
|
||||||
|
#tractor const
|
||||||
|
TRACTOR_HORIZONTAL_LOCATION = DISPLAY_SIZE_HORIZONTAL/2
|
||||||
|
TRACTOR_VERTICAL_LOCATION = DISPLAY_SIZE_VERTICAL/2
|
||||||
|
|
||||||
|
TRACTOR_WIDTH = TILE_SIZE
|
||||||
|
TRACTOR_HEIGHT = TILE_SIZE
|
||||||
|
|
||||||
|
#FRAMES PER SECOND
|
||||||
|
FPS = 144
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user