modularized planting logic by splitting f2.py into main.py, pumpkins.py, and sunflowers.py; updated utilities and added .gitignore
This commit is contained in:
17
sunflowers.py
Normal file
17
sunflowers.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from __builtins__ import *
|
||||
import utils
|
||||
|
||||
|
||||
def place(width, height):
|
||||
utils.plant_grid(width, height, [Entities.Sunflower], 0.75, True)
|
||||
|
||||
# Harvests all sunflowers in the specified area.
|
||||
#
|
||||
# The rules for sunflower harvesting is that we must harvest the flowers with the most petals first
|
||||
# as doing so gives us an 8x bonus.
|
||||
#
|
||||
# Parameters:
|
||||
# width (int): The number of columns in the grid.
|
||||
# height (int): The number of rows in the grid.
|
||||
# flowers (list): A list of sunflower entities to be harvested.
|
||||
def harvest(width, height, flowers):
|
||||
Reference in New Issue
Block a user