ka = 10;  ht = 0.005;  tf = 1000; np = 10; nmod = tf/np; 
    w = 20;
kh = ka*ht;
For[i = 0, i ≤  w + 1, i++, 
        For[j = 0, j ≤  w + 1, j++, u[i, j] = 0.0; 
          un[i, j] = 0.0]];
For[j = 0, j ≤ w + 1, j++, 
        u[0, j] = 0.7;   ];
  
For[k = 0, k < tf, k++, p = {}; 
        For[i = 1, i ≤  w, i++, 
          For[j = 1, 
            j ≤  w, j++, 
un[i, j] =  
              u[i, j] + 
                kh*( u[i, j + 1] +  u[i, j - 1] +  u[i + 1, j] +  
                      u[i - 1, j] -  4*u[i, j]); 
p = 
              Append[p, 
                Graphics[{Hue[(un[i, j])], 
                    Rectangle[{j/100.0, 
                        i/100.0}, {(j + 1)/100.0, (i + 1)/
                          100.0}]}]]]]; 
        If[Mod[k, nmod] == 0, 
          Show[p, AspectRatio -> Automatic]];   
For[i = 1, 
          i ≤  w, i++, 
          For[j = 1, 
            j ≤  w, j++, 
u[i, j] = 
              un[i, j]]]];