Help with Copper Meadows


#1

Here’s my code

loop {
var flag = this.findFlag();
if (flag) {
this.pickUpFlag(flag);
}
else {
this.say(“Place a flag for me to go to.”);
}
}
it works but I run out of time.
HELP PLEASE


#2

Hello Ice Please format your code properly as told in FAQ/Guidelines,

I work with Python this is not my strong suit but I know how I can speed it up,

Do you know the nearest Item pickup?


#3

you should make a var labeled coin and set it to this.findNearestItem(). then scrap the else statement and make it an elif statement with coin as the condition. Then, inside the elif statement, make a var labeled coinPos and set it to coin.pos. make 2 other var statements labeled coinX and coinY and set them to coinPos.x (or .y for coinY). then make the command this.moveXY(coinX, coinY). That should get you to go to the coins. This is really a guess as I work with python, like @Magicfloatincow, but I believe it will work.


#4

Thanks guys. I got the code to work.