G
  • Home
  • Playground
  • step time: ms

    Line: 1, Column: 1

  • result
  • help
  • Rows:     Columns: 

    Commands:

    • step: gardener steps forward
    • turnLeft: turn gardener left
    • plant: plant a flower (max 10)
    • pick: pick a flower (max 10)

    Conditions:

    • isWall: is the gardener facing a wall?
    • isNorth: is the gardener facing north?
    • isPlant: is the a plant where gardener is standing?
    • not: negates condition

    Condition example - if the gardener is not facing a wall, make a step

    if not isWall { step }

    Repeat loop exemple - make turnLeft ans step 3 times

    repeat 3 { turnLeft step }

    while loop exemple (conditional loop) - walk until gardener faces a wall

    while not isWall { step }

    function example - turn back

    fnc turnBack { turnLeft turnLeft } turnBack

    We use cookies and similar technologies to analyze website traffic using Google Analytics. This helps us understand how visitors interact with our site.

    More info

    This website utilizes Google Analytics, a web analytics service provided by Google, Inc. Google Analytics uses cookies to help us analyze how users interact with our site. The information generated by the cookie about your use of the website (including your IP address) will be transmitted to and stored by Google. We use this information to compile reports on website activity and provide other services relating to website activity and internet usage.

    Analytics cookies helps us improve our service.

    Do you have any question? Suggestion?

    Title (*):

    Email:

    Message (*):

    (*) Mandatory fields.