Here is my code it doesnt move after it defeats the first crab and gets the first four gems
while look('up') == "crab" or look('up') == "crate":
zap('up')
while look('left') == "gem":
go('left', 1)
while look('right') == "gem":
go('right', 1)