[SOLVED] Shine getter what is your problem?

what is the problem with this code!

To grab the most gold quickly, just go after gold coins.

while True:
coins = hero.findItems()
coinIndex = 0

# Wrap this into a loop that iterates over all coins.
while coinIndex < len(coins):
    coin = coins[coinIndex]
    # Gold coins are worth 3.
    if coin.value == 3:
    # Only pick up gold coins
        hero.moveXY(coin.pos.x, coin.pos.y)
        coinIndex +=1
        pass

and the process is so slow…

when I delete a tab from the ‘pass’ hero collects two gold then stops again

You put the coinindex += 1 out of the if statement.

1 Like

if the episode opens i try thanks

Are you sure? because it does not work!

OR maybe the episode locked (but it is not cool this is discouraging!!! )

Ok it opened and worked thanks

Hello and welcome to codecombat discourse! This is a cozy forum where you can share ideas, share fan art, get assistance for code, etc! Before you proceed, we hope that you review this topic, which shows all essentials of this board! Thanks!

??? I’ve been on here for over a year

Maybe he miss clicked

you need a fast hero like pender or zana to do the job

if you are a non-subscriber I can’t help you

@milton.jinich you need a fast hero like pender or zana to do the job… Really???
This is a non subscriber level and almost for all levels all you need is a free hero with a modest armor The solution bellow is not the best but it works

1 Like

weird I couldn’t do with those old guys

When I logged in again it worked :slight_smile: and LOL

I could. also since this is solved @Deadpool198 or @Alexbrand can you :lock: this topic?

please tick the post which helped you the most and
Congrats! :partying_face:

What is hero like ‘pender’ or ‘zana’?

Zana is the fastest hero in code Combat Pender is a close second

1 Like

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.