4 ms·
Anyone wanna have a stab at explaining how it works?
by ilitirit 16y ago
Anyone wanna have a stab at explaining how it works?
- dabeeeenster 16y agoIt's recursive. Probably easier to get your head around the recursive solution to the towers of hanoi (http://en.wikipedia.org/wiki/Tower_of_Hanoi http://en.wikipedia.org/wiki/Tower_of_Hanoi) and then start on the Chess code!
- kenjackson 16y agoI really don't think the recursion is the hard part to understand. It's what each variable and magic number means. A while ago someone had a post of the exponentiation function written with single letter variables. It was difficult to know what it was doing. With proper variable names it would be apparent. I think what people are asking is basically, could someone convert this to a program that is actually meant to be read, while still maintaining its exact control flow and logic.