Hanoi Tower programming challenge...
Mark Wieder
mwieder at ahsoftware.net
Wed Jul 18 22:36:16 EDT 2012
Colin-
Wednesday, July 18, 2012, 7:22:59 PM, you wrote:
> In another tool's email list there is a thread going on about how
> it was possible to solve the Hanoi Tower puzzle in under 20 lines.
> Without getting too crazy it was possible to solve the problem in 16
> lines of code. With a little craziness it could be done in 13 lines.
> Assuming you have any idea what I'm talking about, how many lines
> of LiveCode would you need to print out all the steps of solving a
> Hanoi Tower game?
Well, my problem with questions like this is that it's certainly
possible to cram a lot of dreck into a small number of lines in any
programming language, but at the expense of readability. If you look
at the 16-line or 13-line program in another six weeks, do you really
think you can figure out what it's doing? I could probably cram the
whole Tower of Hanoi puzzle into one line of javascript.
--
-Mark Wieder
mwieder at ahsoftware.net
More information about the use-livecode
mailing list