Esempio n. 1
0
 public void getstack(Stack <int> st, Hanoilist glist)
 {
     st.Push(thisindex);
     if (Parentindex != -1)
     {
         glist[Parentindex].getstack(st, glist);
     }
 }
Esempio n. 2
0
        public void setHanoi(int size)
        {
            this.size = size;
            hanoi     = new Hanoi(size);
            glist     = Helper.getGlist();
            tv.set(size, glist);

            tv.Startcal();
            Task t = Task.Factory.StartNew(() => {
                sw.Start();
                try
                {
                    ans = Helper.get_answer(hanoi, mode);
                }
                catch (Exception e)
                {
                }

                sw.Stop();
                calend();
            });
        }
Esempio n. 3
0
 public void set(int size, Hanoilist list)
 {
     hanoisize = size;
     glist     = list;
 }