#!/usr/bin/boiler -i /* * The Towers Of Hanoi * boil * Copyright (C) 1998 Amit Singh. All Rights Reserved. * http://hanoi.kernelthread.com * * Tested under boil-1.0beta7 */ { long DISKS=3; void movedisk(string from, string to) { printf("move " + from + " --> " + to + "\n"); }; void hanoi(long N, string to, string from, string using) { if (N > 0) { hanoi(N-1, using, from, to); movedisk(from, to); hanoi(N-1, to, using, from); } }; hanoi(DISKS, "3", "1", "2"); }