function retSpaces = updatePits(pits)

for x = 1:4
    for y2 = 1:4
        r = 4 - y2 + 1;
        c = x;
        
        if pits(r,c) > 1
            y = 0;
            if r+1 < 5 && c+1 < 5 && pits(r+1,c+1) > 1
                
                y = 2;
            end
            if r+1 < 5 && c-1 > 0 && pits(r+1,c-1) > 1
                
                y = 2;
            end
            if r-1 > 0 && c+1 < 5 && pits(r-1,c+1) > 1
            
                y = 3;
            end
            if r-1 > 0 && c-1 > 0 && (pits(r-1,c-1) > 1)
                
                y = 4;
            end
            
            if y == 0
                pits(r,c) = 100;
            end
            
        end
        
    end
end
retSpaces = pits;
end