Information about cookies on this page

Our website uses cookies to ensure the functionality of the website, to collect and analyze information about the performance and usage of the website. Privacy Policy

  • Courses
    • Discord
    • Twitter
    • Linkedin
    • Facebook
    • Instagram
  • Pricing
  • English
  • Čeština
  • Deutsch
  • Русский
Sign inStart free
  • Courses
  • Pricing

Community

Sign in
  
  • Courses
    • Discord
    • Twitter
    • Linkedin
    • Facebook
    • Instagram
  • Pricing
  • English
  • Čeština
  • Deutsch
  • Русский
Sign inStart free
  • Courses
  • Pricing

Community

Sign in

Treats on the Course

The warm-up went well. Now the organizers have put treats on the courses: bones, which the dog gets to keep if it picks them up. Some lie on the straight parts, others right at the corners.

The editor holds a program that runs the warm-up: until the dog is at the goal, it turns right while there's no path ahead, and then takes a step. If you built yours another way, that's fine; many programs were correct. Run this one first: the dog reaches the goal, but it runs past every bone.

The task. Add to the program so that the dog picks up every bone and still finishes at the goal. Don't build it again: the part that runs the course works, so keep it and add only what's missing. That's how programs grow: what works stays, and new things are added one at a time.

A tip: not every part of the loop runs on every tile. Some blocks run only where the dog has to turn. Where does the check for a bone go, so that the dog looks at every tile it gets to, corners included?

Instructions

  1. 1

    Pick up all the bones on all three maps.

  2. 2

    And still finish at the goal.

Back

2/3

  1. 1. Warm-Up
  2. 2. Treats on the Course
  3. 3. The Big Run
Next

Try it yourself

Do this exercise right here in your browser. No account needed.