A little code. A little cultivation.

Balance

0.00

01 Your code

EDITOR

Output

READY
Write your commands, then click Compile.

Shop

Current field: 1 × 1

02 Your field

1 × 1

Seeds

Wheat
Tomato
0
Cucumber
0

Harvest inventory

Wheat
0
Tomato
0
Cucumber
0

Commands

direction(right)
Face up, down, left, or right without moving.
is_harvestable()
Return True if the selected tile has a fully grown plant; otherwise False.
sell(wheat, 2)
Sell a whole number of harvested wheat, tomato, or cucumber plants and add their value to your balance.
move()
Move one tile in the current direction. Starts facing right. The blue edge shows the facing side.
plant(wheat)
Plant wheat, tomato, or cucumber on an empty tile, using one seed. Wheat seeds are unlimited.
harvest()
Collect a grown plant. An immature plant is removed without a reward.
reset()
Return to the upper-left tile, (0, 0), facing right.
reset_field()
Remove every plant and return to (0, 0), facing right. Inventory and balance stay unchanged.
get_position()
Return the current (x, y) coordinates.
get_x_cord()
Return the current x coordinate.
get_y_cord()
Return the current y coordinate.
get_direction()
Return the current direction.
get_inventory(wheat)
Return the harvested inventory count for wheat, tomato, or cucumber.
print("Hello")
Print a quoted string or value, such as print(get_position()). Single quotes work too.
if(True):
Run the indented block once. if(False): skips it. Numeric comparisons are supported, such as get_x_cord() == 2.
else:
Run this indented block when the matching if is false. Align else with its if.
while(True):
Repeat while the condition is true. For example: while(get_x_cord() < 4):
while(False):
Skip the indented block.
and / &
Both conditions must be true. Evaluated before or.
or / |
At least one condition must be true. Use parentheses to group conditions.

One statement per line. Tab inserts four spaces; Shift+Tab removes indentation. Press Escape then Tab to leave the editor. Commands and while/if checks each pause for 500 ms.

while(True):
    plant(wheat)
    harvest()
    move()

Blank lines and full-line # comments are allowed. Runs continue from the last position. Edge moves stay on the field.