5 ms·
The maze is random and will regenerate when you execute the program, so you need to be lucky to pull that off. I mean, you can just reload until it works, and I
by einr 8y ago
The maze is random and will regenerate when you execute the program, so you need to be lucky to pull that off. I mean, you can just reload until it works, and I think that is a solution within the spirit of the game too, but quite an inelegant one :)
Mine was to bypass the maze solving completely by instead breaking out of the function scope to declare a global direction variable that lets the phone toggle the direction of the robot, then just press R to take a step in the chosen direction ;) Stupid? Elegant? Rule-breaking? You decide...
https://gist.github.com/Untrusted-Game/ba346481d41ce8576d21e84efb84a161 https://gist.github.com/Untrusted-Game/ba346481d41ce8576d21e...
- edejong 8y agoMine (eventually) followed the direction of the player, but then with y-20.
- lozenge 8y agoWell, I guess I had beginner's luck, because it loaded like that first time. There is a local variable for the player, so getting the robot to move towards your x-position solves most of the mazes.