Refactored hanoi algorithm

Hi, I'm a computer science student and I'm just getting started with git. I was interested by your hanoi implementation on the uArm, but noticed that there are lots of repeating parts on your code and tried to refactor it to make it shorter and more understandable.

This way it should work for an n larger than 3, though I have not been able to try it since I don't own a uArm for now.

I also couldn't find a pattern to systematically determine the heights in each step by looking at the arguments. Apart from that it should work.
I'd appreciate it if you tried it (modifying the heights if necessary) and told me what you think.