Help for this page

Select Code to Download


  1. or download this
    sub movedisks { #to make this move
    
  2. or download this
      my( $num, $from, $to, $aux ) = @_;
      if( $num == 1 ) {
        ;
      } else {
    
  3. or download this
        #you have to make those two moves first
        movedisks( $num-1, $from, $aux, $to );
        movedisks( $num-1, $aux, $to, $from );
    
  4. or download this
      }
    }