towers of hanoi source code in VB??
Printable View
towers of hanoi source code in VB??
Well, since your towers are stacks, just make three stacks (First in, last out) containing the variables that describe the disks. Then as the user wants to move a disk, just grab the next one in the stack, compare it's size to the disk on top of the stack the user wants to move it to, then move variable if the disk will fit.
Brewguru99