CodePen

HTML

            
              
            
          
!

CSS

            
              
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              function Move_Disc_Queue (from_pin, to_pin) {
    queue.push ({from:from_pin, to:to_pin});
}

function Process_Queue () {
    if (queue.length > 0 && state == 'running') {
        var elem = queue.shift ();
        Move_Disc (elem.from, elem.to, Process_Queue);
    }
}

function Move_Stack (size, from, to, middle) {
    if (size == 1) {
        Move_Disc_Queue (from, to);
    }
    else {
        Move_Stack (size-1, from, middle, to);
        Move_Disc_Queue (from, to);
        Move_Stack (size-1, middle, to, from);
    }
}

            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................