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); } }
public void MoveTo(Tower other) { other.Push(this.Pop()); }