Code M_5_1_01

Komplexe Methoden –  M.5 Baumdiagramme –  M.5.1 Rekursion –  M_5_1_01


  • 414 - 415


  • 2014-04-27 @ 7:26 pm   |  Comment by Massimo Franceschet

    I think the test


    if (level > 0)


    should be moved at the beginning of the drawBranch function to avoid the drawing of 0-level branchings.



    Moreover the block

    int k = int(key)-49;if (k>=0 && k<9) {recursionLevel = k;}


    should be rewritten as:


    int k = int(key)-48;if (k>=0 && k<=9) {recursionLevel = k;}





  • 2014-04-27 @ 7:48 pm   |  Comment by Massimo Franceschet

    The sketch is great, anyway!

Leave a Comment



Please enable JavaScript to post a comment.

(.zip, max. 1MB)  

Proof that you are human!
Please paste the snippet below in an empty Processing sketch!
What number does the Processing console show?