## 22. It's raining!

It was a beautifully sunny day. Reeborg was playing outside with his friend. Suddenly, it started to rain and Reeborg remembered that the windows in his house were all open. So Reeborg went back to his house and stopped in front of the door, unsure of how to proceed.

Help Reeborg close the windows of his house. A closed window, in Reeborg's world, has a beeper in front of it. When Reeborg finishes his task, he will stand in the doorway, watching the rain fall, waiting for it to stop before he can go back and play outside, as illustrated below.

The world file is `rain1.wld`; Reeborg carries more thanenough beepers to accomplish his task.

### Reeborg's friend's turn.

Erdna, Reeborg's friend, lives in a bigger house. Erdna was playing outside with Reeborg when it started raining. Help Erdna close the windows in her house. The starting position is:

The corresponding world file is `rain2.wld`.

When Erdna is finished, she too will be standing in the doorway of her house as illustrated below.

You may find this second problem a bit tricky to solve. Perhaps you should consider the possibility that Erdna will need to step back sometimes...

### One program should be enough!

Verify to see if the program you wrote to help Erdna close the windows in her house can be used by Reeborg to do the same for his house. If not, change it so that it works for both Erdna and Reeborg.

Amazing - part5 - - After the storm