function area = CS6380_Assgn1_put_dirt(num_rows,num_cols,percent_dirt)
% CS6380_Assgn1_put_dirt - prepare area to be cleaned
%   put dirt (value 1) in percent_dirt number of cells
% On input:
%     num_rows (int): number of rows in area
%     num_cols (int): number of cols in area
%     percent_dirt (float): percentage of cells to contain dirt
% On output:
%     area (num_rowsxnum_cols array): area to be cleaned
%       each position has value:
%          0: no dirt
%          1: dirt
% Call:
%     a1 = CS6320_Assgn1_put_dirt(20,20,0.4)
% Author:
%     T. Henderson
%     UU
%     Summer 2014
%

area = zeros(num_rows,num_cols);
for r = 1:num_rows
    for c = 1:num_cols
        if rand<=percent_dirt
            area(r,c) = 1;
        end
    end
end
