Exemplo n.º 1
0
        public HanoiDisk popDisk()
        {
            HanoiDisk d = getNextDisk();

            this.hanoiDisks.Remove(d);
            currentDiskCounter--;
            return(d);
        }
Exemplo n.º 2
0
        public bool pushDisk(HanoiDisk d)
        {
            hanoiDisks.Add(d);
            hanoiDisks.Remove(null);
            currentDiskCounter++;

            if (currentDiskCounter == 1)
            {
                startDiskCounter();
            }
            return(true);
        }