Grid-search, why pos = {'x': 20 , 'y': 30} hero.move(pos) does not work?

Hi, I am on grid-search-Level.

I don’t understand why my code works with hero.moveXY(x,y) and it does not with
pos = {'x': x , 'y': y} hero.move(pos)

Here is the whole code:

leftBorder = 20
rightBorder = 61
bottomBorder = 20
topBorder = 51
step = 10

# Iterate X coordinates from the left to right border with step 10.
for x in range(leftBorder, rightBorder, step):
    # Use a nested loop to iterate through Y coordinates for each X.
    # Iterate y coordinates from the bottom to top border with step 10.
    for y in range(bottomBorder, topBorder, step):
        # Move to the point with coordinates X, Y and say anything.
        hero.moveXY(x,y)
        
        #does not work
        #pos = {'x': x , 'y': y}
        #hero.move(pos)
        
        hero.say("I move to "+ x+ " "+y)
    pass

# Allow peasants to check the last point.
hero.moveXY(20, 10)

move only moves you one step towerds the pos this is better if what you are going for is a moving target like if senick steel claw was chasing a sand yak moveXY is better if you are moving to one place like if you were killing all the eneis you see and then moving to a X mark

Oh, thanks, I got it!