Task

Solve the   Towers of Hanoi   problem with recursion.




HAI 1.2
 
HOW IZ I HANOI YR N AN YR SRC AN YR DST AN YR VIA
    BTW VISIBLE SMOOSH "HANOI N=" N " SRC=" SRC " DST=" DST " VIA=" VIA MKAY
    BOTH SAEM N AN 0, O RLY?
        YA RLY
            BTW VISIBLE "Done."
            GTFO
        NO WAI
            I HAS A LOWER ITZ DIFF OF N AN 1
            I IZ HANOI YR LOWER AN YR SRC AN YR VIA AN YR DST MKAY
            VISIBLE SMOOSH "Move disc " N " from " SRC " to " DST MKAY
            I IZ HANOI YR LOWER AN YR VIA AN YR DST AN YR SRC MKAY
    OIC
IF U SAY SO
 
I IZ HANOI YR 4 AN YR 1 AN YR 2 AN YR 3  MKAY
 
KTHXBYE
 