Building walls

You can easily change Reeborg's world by adding walls. To do so, you click on edit walls button and the display changes to look like this:

buildwalls

By clicking on the red dotted line between two "pillars" you can either add or delete a wall. Note that you can't remove walls on the border.

wall1img

When you click on edit walls button again, the pillars are removed and the red dotted lines disappear, but the new wall remains.

Your turn

Create a world like the one indicated below ( and save it) and then write a program that guides Reeborg to emerge at the bottom of the simple maze following the path indicated.

loopstart lead to loopend


Challenges

We end this lesson with a few exercises. The exercises in this lesson should not be too difficult to do; actually, at this stage, they might even feel a bit tedious ... but they will really help you in the following lessons.

Newspaper delivery

Reeborg delivers newspapers in his local neighbourhood. Have him climb the stairs to the front door of a house, drop the newspaper (represented by a beeper) on the top step, and return to his starting point as illustrated below. The world file is newspaper.wld.

newspaper start
lead to newspaper end

To accomplish this task, you will find that you need Reeborg to follow more than 50 commands, which requires a fair bit of typing. The more typing one does, the more errors can occur. In the next chapter we will see how to use Python to simplify considerably the solution to this exercise.


Jumping hurdles

Reeborg has entered a hurdles race. Write a program that have him follow the path indicated below in his way to the finish line. The world file is hurdles1.wld.

hurdles start
lead to hurdles end

In the next lesson we will see how to write a short program to accomplish the same task. Later, we will learn how to teach Reeborg to automatically jump over hurdles of different heights and unevenly spaced.


Harvest time

It's harvest time! Have Reeborg pick up all the carrots (represented by beepers) in this garden. The world file is harvest1.wld.

harvest start

Later, we will learn how to write a much shorter program to accomplish the same task. Then, we will teach Reeborg how to handle on his own situations where there are missing carrots at arbitrary places in the garden.


Amazing escape

Reeborg is lost in a maze. Help him find his way out. The shortest possible path is indicated below. The world file is maze1.wld.

maze start lead to maze end

In a later lesson, we will see how to have Reeborg find his way out on his own, using the same program to get out of many different mazes.


previous Darn bugs! - home - Definitely avoiding repetitions next
../images/SourceForge.net Logo