Sub-Elements

You can create elements inside elements. This can help you to organise your code. Sub-elements do not appear in the SandPond menu.

element Snake {

    element Head {
        // Snake.Head code goes here...
    }

    element Tail {
        // Snake.Tail code goes here...
    }
}

Last updated