2021-03-29 02:19:55 +02:00
|
|
|
import random
|
|
|
|
|
|
|
|
from Main.Field import Field
|
|
|
|
from Main.constants import *
|
|
|
|
|
2021-03-29 13:06:57 +02:00
|
|
|
states = ['toPlow', 'toSeed', 'toFertilize', 'toWater', 'toCut']
|
2021-03-29 02:19:55 +02:00
|
|
|
|
|
|
|
def generate():
|
|
|
|
board = []
|
|
|
|
for i in range(0, int(HORIZONTAL_TILES_NUMBER)):
|
|
|
|
board.append([])
|
|
|
|
for j in range(0, int(VERTICAL_TILES_NUMBER)):
|
2021-03-29 13:06:57 +02:00
|
|
|
board[i].append(Field(int(i * TILE_SIZE), int(j * TILE_SIZE), random.choice(states)))
|
2021-03-29 02:19:55 +02:00
|
|
|
return board
|