A little code. A little cultivation.
Balance
0.0001
Output
Write your commands, then click Compile.
Shop
Current field: 1 × 1
Plants
| Plant | Seed price | Growth time | Wither chance | Selling price |
|---|---|---|---|---|
| Wheat | 0.00 | 0.6 s | 0% | 0.50 |
| Tomato | 0.20 | 2 s | 5% | 2.00 |
| Cucumber | 0.50 | 4 s | 5% | 5.00 |
| Watermelon | 2.00 | 10 s | 10% | 8.00 |
02 Your field
Seeds
- Wheat
- ∞
- Tomato
- 0
- Cucumber
- 0
- Watermelon
- 0
Harvest inventory
- Wheat
- 0
- Tomato
- 0
- Cucumber
- 0
- Watermelon
- 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.
buy(tomato, 2)- Buy seeds using a non-negative whole number or numeric getter as the quantity.
sell(wheat, get_inventory(wheat))- Sell harvested plants using a non-negative whole number or numeric getter as the quantity.
move()- Move one tile in the current direction. Starts facing right. The blue edge shows the facing side.
plant(wheat)- Plant wheat, tomato, cucumber, or watermelon on an empty tile, using one seed. Wheat seeds are unlimited.
harvest()- Collect a grown healthy plant. Immature and withered plants are removed without a reward. Healthy watermelon squares gain a yield multiplier.
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, cucumber, or watermelon.
print("Hello")- Print a quoted string or value, such as print(get_position()). Single quotes work too.
if(True):- Run the indented block once. Conditions support numeric comparisons and string equality checks.
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.
for i in range(5):- Repeat the indented block a fixed number of times. The loop name cannot be used inside the block yet.
break()- Exit the nearest while or for loop.
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 loop/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.