private void DrawStacks()
 {
     pictureBox1.Image = BitmapGenerator.GenerateHanoiTower(a.ToArray(), b.ToArray(), c.ToArray(), pallete);
     counter++;
     pictures[disks].Image = BitmapGenerator.GenerateNumberImage(pictures[disks].Width, pictures[disks].Height, counter);
     Application.DoEvents();
     Thread.Sleep(900);
 }
        private void ShowStatistic()
        {
            while (!Finish)
            {
                Thread.Sleep(500);
            }
            pictureBox1.Image = BitmapGenerator.GenerateHanoiTower(new int[0], new int[0], new int[0], pallete);
            int pow;

            for (int i = 1; i <= 8; i++)
            {
                pow = (int)Math.Pow(2, i);
                pow--;
                pictures[i - 1].Image = BitmapGenerator.GenerateNumberImage(pictures[i - 1].Width, pictures[i - 1].Height, pow);
            }
        }
        private void Initialize()
        {
            a.Clear();
            b.Clear();
            c.Clear();
            counter = 0;
            int n     = 100;
            int limit = 100 - (disks * 10);

            while (n >= limit)
            {
                a.Push(n);
                n -= 10;
            }
            pictureBox1.Image     = BitmapGenerator.GenerateHanoiTower(a.ToArray(), b.ToArray(), c.ToArray(), pallete);
            pictures[disks].Image = BitmapGenerator.GenerateNumberImage(pictures[disks].Width, pictures[disks].Height, counter);
        }