@@ -0,0 +1,1553 @@
+//  Copyright 2016 The Minorminor Open Source Project%0A//%0A// Licensed under the Apache License, Version 2.0 (the %22License%22);%0A// you may not use this file except in compliance with the License.%0A// You may obtain a copy of the License at%0A//%0A//     http://www.apache.org/licenses/LICENSE-2.0%0A//%0A// Unless required by applicable law or agreed to in writing, software%0A// distributed under the License is distributed on an %22AS IS%22 BASIS,%0A// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A// See the License for the specific language governing permissions and%0A// limitations under the License.%0A//%0A%0Apackage charter5.exercises;%0A%0A/*%0A   C     T      A%0A   %7C     %7C      %7C%0A   %7C     %7C      %7C%0A   %7C     %7C      _%0A   %7C     %7C     ___%0A   %7C     %7C    _____%0A%0A   The smallest is on the top and the largest is on the bottom.%0A   The puzzle is to move all the disks from peg A to peg C,%0A   moving one disk at a time, so that we never place a larger disk on top of a smaller one.%0A */%0Apublic class C516HanoiTowersPuzzle %7B%0A    public static void move(int n, String from, String to, String by) %7B%0A        if (n == 2) %7B%0A            System.out.println(String.format(%22move %25d from %25s to %25s%22, 1, from, by));%0A            System.out.println(String.format(%22move %25d from %25s to %25s%22, 2, from, to));%0A            System.out.println(String.format(%22move %25d from %25s to %25s%22, 1, by, to));%0A            return;%0A        %7D%0A        move(n - 1, from, by, to);%0A        System.out.println(String.format(%22move %25d from %25s to %25s%22, n, from, to));%0A        move(n - 1, by, to, from);%0A    %7D%0A%7D%0A

Add C516HanoiTowersPuzzle