# File examples/oo-board.rb, line 43
  def draw_pieces()
    0.upto(@w) { |x|
      0.upto(2) { |y|
        # draw top piece
        rect = [x * @bw + @bw / 2, y * @bh + @bh / 2, @bw * 0.4, @bh * 0.4]
        # Imlib2 bug (works w/ draw_ellipse, but not w/ fill_ellipse)
        @im.fill_ellipse rect, @tc if (x - (y % 2)) % 2 == 1
    
        # draw bottom piece
        rect[1] = h * @bh - rect[1]
        # Imlib2 bug (works w/ draw_ellipse, but not w/ fill_ellipse)
        @im.fill_ellipse rect, @bc if (x - (y % 2)) % 2 == 0
      }
    }
  end