6.5. Program Implementation - 3ΒΆ

You may have noticed that the drawWall and drawDoor procedure do not worry about where the shape is being drawn. We could put a goto into them so that they handle jumping to the right location to draw their shape. But, that would make it so they can only draw in one location. We will want to call the drawWindow procedure twice to draw two different windows. That will not work if drawWindow always jumps to a fixed location to do its drawing.

This version of the program has drawWindow defined. But, it is not tested yet. Add a test of the procedure to the end of the main part of the program.

Test drawWindow by drawing a window at -100, 0

You have attempted of activities on this page