Here is part of the code
------------------------------
declare Made
declare MakeBlobs
proc {MakeBlobs H}
   proc {AllDone LH LR LC}
      Made = true
      {TestCell LH LR LC}
      {Browse ['Made = ' Made]}
   end
 
   proc {ThisCell ThisH ThisR ThisC}
      if ThisC == NumC then
  if ThisR == NumR then
     {AllDone ThisH ThisR ThisC}
  else
     {TestCell ThisH ThisR ThisC}
     {ThisCell ThisH+1 ThisR+1 1}
  end
      else
  {TestCell ThisH ThisR ThisC}
  {ThisCell ThisH+1 ThisR ThisC+1}
      end
   end
   proc {TestCell ThisH ThisR ThisC}
      if {Random 1 10} > 5 then
  {H.ThisH set(fill:black)}
      end
   end
in
   {ThisCell 1 1 1}
end
 
{MakeBlobs Grid}
----------------------------------
Grid is a record that contain the tag for each rectangle in the array.  I've declared a variable Made that is supposedly set when the last cell is coloured in the AllDone procedure.  The next stage should be to select a cell but not until the blobs are made!  My problem is how to achieve this.  I can supply some more code for it if that is needed but, since it doesn't work I'll hold fire until asked.
 
Alan
_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to