You have to collect all the gems.
Read the goals.
So just check if its a gem:
If its a gem:
Move to it.
If its a coin and your distanceTo the coin < 20:
move to it.
Hope this helps
Wait a sec let me try
Read this. (20 chars)
You need TWO if statements
You can’t just do if gem. Gem is an item TYPE.
So: here is some sample stuff:
while True:
item = hero.findNearestItem()
if item and item.type == 'coin' and hero.distanceTo(item) < 20:
hero.moveXY(item.pos.x, item.pos,y)
Do the gem part by yourself.
Literlly copy paste the code I gave you.
This level isnt very hard.
In a nutshell how to complete:
Look for nearest item:
if item.type == ‘gem’:
move to it.
Make another if:
if item.type == ‘coin’ and hero.distanceTo(item) < 20:
Move to it
You only need 6 lines of to beat this level.
I think you can do it.
Where do I put it? (2000000000)
Here’s a template:
Delete all ur code, and Copy paste this.
while True:
item = hero.findNearestItem()
if item and item.type == 'gem':
hero.moveXY(item.pos.x, item.pos.y)
if item and item.type == 'something':
#move to the item
Then figure it out. (20 chars)
You are so close.
For the coin just do
if item and item.type == ‘coin’ and hero.distanceTo(item) < something:
Just submit over and over.
It gives you a different seed everytime, and you prob got unlucky
It is either I did not get the coin or I did not get the gem
@staff (20000000) charsssss
Do not ping staff. Someone will come and help you.
@RangerGrant9307 told me too
So what proble do you have now? Also, please post your code.