


Nice!
It might be nice to redraw the tree when Z is pressed instead of reloading the whole cartridge. Something like this, maybe?
function _update() if btnp(4) then _init() end end |
It can be fun to have more branches, which can be done by having a function which calls itself:
function draw_branch( x1,y1,depth,branches) if depth==0 then return end for branches=0,branches do local x2,y2=draw_line(x1,y1) draw_branch(x2,y2, depth-1,branches+1) end end function _init() cls() draw_branch(64,128,5,0) end |
[Please log in to post a comment]