Oberon Community Platform Forum

Development => Oberon & Active Oberon => Topic started by: Wouter on December 05, 2010, 06:49:13 PM



Title: Recursively solving the Towers of Hanoi in Oberon-2
Post by: Wouter on December 05, 2010, 06:49:13 PM
Hi, I've been working on this recursive way to solve a game of the Towers of Hanoi in Oberon-2. I seem to have made an error somewhere, but cannot for the love of me find it. I know there's probably something wrong with the way I am moving the disks around, because I am able to get as far as taking of the top disk and placing it onto the third tower but then I get a TRAP error (access violation). If I make the tower parameters (which are RECORDS, see code below) variable, I get one step further: moving the second disk onto the second tower. But then, TRAP. My programming code can be found in the .arc-file attached.