Grand Prix AI League Topic

Yeah I always lose to him and idk what to do

I thought it was you
Screenshot 2025-06-05 110704
i click this
and


he is my opponent but i could be wrong

1 Like

sorry foe all of the questions, I don’t really understand the arena. But why does this not work???

item = hero.findNearestItem()
if len(item) > 0:
if item.y > hero.y:
hero.moveUp(1)
elif item.y < hero.y:
hero.moveDown(1)
elif hero.y == item.y:
if item.x > hero.x:
hero.moveRight(1)
if item.x < hero.x:
hero.moveLeft(1)

What does it do? Does the code just glitch out?

1 Like

no it just skips past the line and does nothing. I want it to collect the items.

I haven’t submitted my code tho

1 Like

Idk then cause starrydreamer is ur user right?

Yes but I haven’t submitted

Are you calling the function in a while loop?

hero.findNearestItem returns the nearest item, not a array.
Hero.findItems returns a array of every item while hero.findNearestItem returns the nearest item

It’s a bug with the if len(item)>0 part. Since it returns a single item, it’s not a array, hence len won’t work

Yeah u got me im Chiron lol

Lets gooooooooooooooooooo

1 Like

Imma do this tournament later I purposely dropped my code so

Is it just me or does it rank you super slowly?

2 Likes

Mine does to it is really annoying when I’m trying to see if my code is good

1 Like


I waited five minutes

1 Like


:skull::skull::skull:

2 Likes

XD. The servers are prob just using all their recources to run the final sims for King’s Gambit.

2 Likes