
procedure fillcell(win, n, m, color)
   local  save_fg

   save_fg := Fg(win)
   Fg(win, color)

   FillRectangle(win, (n - 1) * cellsize, (m - 1) * cellsize, cellsize,
      cellsize)

   Fg(win, save_fg)

   return

end
