(dang computer just shut itself down Instant-off.)
Please don’t hand type in your code, copy and paste your code from the code window.
You have typos (don’t know if they are in your actual code or not) (finsih & slef)
Remove the "and self.pos.x < 60"s those are trying to do the "loop:"s job.
As matt says you have a self.pos.x < self.pos.x + 5, looks like you meant “start + 5”
gem = gems[0] will always me gems[0]
gem = gems[len(gems) + 1] will never work “len(gems)” is already a non-existant gem “+ 1” is still non-existant.
(if you meant “- 1” then it would always be the last gem, which doesn’t get you any farther than the other always being first. Especially, since the next thing to happen would be to set it to the first… (gem = last, while check, gem = first, use gem, gem = last, …)
the second one needs to just be removed and the first should set gem to the current gem.
So except for the “gems” bit we just went over, you have a good idea you just have several lines with the wrong indent and some are in the wrong place.
example of place & indent. the setting of “gem” to current gem should be somewhere (outside of while loops) between loop: and the second while loop. it doesn’t get/need reset during the walking… (same with start&finish)
Only put in the loop, what needs to be - in the loop.
OK, having said all that . . . we can get to the real problem . . . “move()” likes to cause the “slow/inf-loop” error. It is not your code. (I know nick is/was looking into it.)
spoiler: code would work if not for Mr. move()
gems = self.findItems()
count = 0
loop:
gem = gems[count]
count +=1
start = self.pos.x
while self.pos.x < start + 5:
self.move({'x': start + 5, 'y': 35})
finish = self.pos.x
while self.pos.x < finish + 5:
self.move(gem.pos)