May 2018
Intermediate to advanced
256 pages
6h 20m
English

The rooms we built with the buildRoom() function in Chapter 12 are useful, but they won’t keep the rain out. In this chapter, we’ll write a buildFloor() function to build floors and ceilings, and we’ll also write a buildfloor program to call that function. We’ll use one function to build floors and ceilings because a ceiling is just a floor built higher up, as shown in Figure 13-1.
The algorithm we’ll use to build floors will move a turtle across a rectangular area and make the turtle perform an action at every space. In this chapter, the turtle will place a block at every space in the rectangular area, but this flexible ...
Read now
Unlock full access