Files
farmer-was-replaced/main.py

50 lines
1.4 KiB
Python

import utils
import pumpkins
import sunflowers
from __builtins__ import *
def plant_carrots(width, height):
utils.plant_grid(width, height, [Entities.Carrot], 0.75, True)
def plant_grass(width, height):
utils.plant_grid(width, height, [Entities.Grass], 0.75, False)
def plant_alternating(width, height, plantWith):
utils.plant_grid(width, height, plantWith, 0.75, False)
if __name__ == "__main__":
while True:
worldSize = get_world_size()
sectionSize = worldSize // 3
utils.move_to(0, 0)
grid = sunflowers.place(sectionSize, sectionSize)
utils.move_to(0, 0)
sunflowers.harvest_grid(sectionSize, sectionSize, grid)
utils.move_to(sectionSize+1, 0)
plant_carrots(sectionSize, sectionSize)
utils.move_to(sectionSize*2+1, 0)
plant_grass(sectionSize, sectionSize)
utils.move_to(0, sectionSize+1)
plant_alternating(sectionSize, sectionSize, [ Entities.Tree, Entities.Bush ])
utils.move_to(sectionSize+1, sectionSize+1)
pumpkins.plant_and_verify(sectionSize, sectionSize)
utils.move_to(sectionSize*2+1, sectionSize+1)
plant_carrots(sectionSize, sectionSize)
utils.move_to(0, sectionSize*2+1)
pumpkins.plant_and_verify(sectionSize, sectionSize)
utils.move_to(sectionSize+1, sectionSize*2+1)
plant_alternating(sectionSize, sectionSize, [ Entities.Tree, Entities.Bush ])
utils.move_to(sectionSize*2+1, sectionSize*2+1)
pumpkins.plant_and_verify(sectionSize, sectionSize)