Robot Algorithm

Available Commands:
• moveForward() - Move one cell forward
• turnLeft() - Turn 90° left
• turnRight() - Turn 90° right
• canMoveForward() - Check if path ahead is clear
• isAtGoal() - Check if reached the goal
Status: Ready
Write your algorithm and click Run!