function [  ] = SimpleFloodFill( XX, YY)
%UNTITLED4 Summary of this function goes here
%   Detailed explanation goes here

global M
global color2
global Ax
if M(XX,YY)==0
      pause(0.01);
    M(XX,YY)=color2;
      image(M');set(Ax,'YDir','normal');
     SimpleFloodFill( XX , YY+1 );
     SimpleFloodFill( XX+1 , YY );
     SimpleFloodFill( XX-1 , YY );
     SimpleFloodFill( XX , YY-1 );



end

