Squeak Programming 1 Square shapes and Polygons
Fall 2005

  1. Add a category to the Bot Browser. Call it shapes (Middle button o rleft/right click)

  2. Write a generic polygon method:
     polygon: n length: sidelength
       "Draw polygons of n sides with each of length sidelength"
    	n timesRepeat: [
    		self go: sidelength.
    		self turnLeft: 360/n.
        ]
     
  3. accept this new method for your category mymethods
    - Middle button or Right/Left click on the method definition and accept (s)

  4. Define another pyramid method:

  5. Bot new pyramid

  6. Assignment: Write a generic pyramid method for n steps of variable sidelength.
     pyramid: n length: sidelength
    
    	 . . .
      

  7. Assignment part 2: Write a checkerboard method, then a checkerboard pyramid method.