function retSpaces = adjustPitsAndMonsters2(row, col, spaces, explored)
if explored(row,col) == 2
if 0 < row+1 && row+1 < 5 && 0 < col && col < 5
     spaces(row+1, col) = 0;
     
end

if 0 < row-1 && row-1 < 5 && 0 < col && col < 5
       spaces(row-1, col) = 0;
      
end

if 0 < row && row < 5 && 0 < col+1 && col+1 < 5
       spaces(row, col+1) = 0;
      
end

if 0 < row && row < 5 && 0 < col-1 && col-1 < 5
       spaces(row, col-1) = 0;
      
end

end
retSpaces = spaces;


end