Simple Hanoi function using xCode