# HanoiWorld

This world implements the ultra-classical Hanoi problem. You are asked to move the disk pile from the stick where they are to the target stick (given as second parameter in the world's name -- number 1 for the default world). There is some extra constraint: you can only move one disk at a time, and you cannot move a big disk over a smaller one.

Only 4 functions are provided:

    [!java|c]void [/!]move([!java|c]int [/!]src, [!java|c]int [/!]dst)

Moves one disk from the stick `src` onto the stick `dst`. If you try to do an invalid move (like laying a disk over a smaller one), an IllegalArgumentException is thrown.

    [!java|c]int [/!]getSlotSize([!java|c]int [/!]slot)[!scala]:Int[/!]

Returns the amount of disks placed on the specified slot. This is mainly used to initialize the recursion and set the amount of recursive call to execute.

    [!java|c]int [/!]getSlotRadius([!java|c]int [/!]slot)[!scala]:Int[/!]

Returns the radius of the top-most disk of the specified slot.

    [!java]boolean [/!][!c]int [/!]isSelected()[!scala]:Boolean[/!]

Returns whether the current world is selected in the graphical interface.