Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

[Adventurer] Gardener

#1

The level Gardener is ready for testing.

It’s Mountain level from Geometry series. Let’s continue to improve your flower skills.

2 Likes

#2

completed level without issue

submitted LUA patch

1 Like

#3

Thanks, Harry!

20characters

1 Like

#4

How do you do this level?

Thanks

0 Likes

#5

Hello Demented-Pufferfish. Welcome to the CodeCombat discourse! :tada:
You can access the level here.
:lion: :lion: :lion:

0 Likes

#6

Please post your code, and we’ll help you from there.

0 Likes

#7

What I mean is when they ask you to go to the to any corner of the square.

We need square flower fences around the statues.

This function should make a square with the certain side

around the center {cx, cy} point.

def growSquare(cx, cy, side):
# Move to any corner of the square.
hero.moveXY(cx, cy)
# Start growing.
hero.toggleFlowers(True)
# Now move to all other corners one by one.
# Use clockwise or countercloclwise order.

# Don't forget to return in the first corner.

# Stop growing.
hero.toggleFlowers(False)

The keeper will tell you where to grow flowers.

keeper = hero.findNearest(hero.findFriends())
points = keeper.pointsForWork

All squares should have the same size.

squareSize = 8

We don’t need excess flowers.

hero.toggleFlowers(False)

for pos in points:
# Don’t forget complete this function.
growSquare(pos.x, pos.y, squareSize)

0 Likes

#8

Please learn to post your code correctly. The way it is now, we can’t see the structure. Help us help you. It’s very easy to do and just takes a tiny bit of effort. Please read this topic and format your code again correctly

0 Likes