Ejemplo n.º 1
0
        public DiskManager(int diskCount)
        {
            Origin      = new Tower("Origin");
            Buffer      = new Tower("Buffer");
            Destination = new Tower("Destination");

            //Add Disks in Origin Stack from bigger to lower
            for (int i = diskCount; i > 0; i--)
            {
                Origin.Push(i);
            }
        }
Ejemplo n.º 2
0
 public void MoveTo(Tower other)
 {
     other.Push(this.Pop());
 }