Rename 5.AFK.py to 5.AFK_3x3.py

This commit is contained in:
DearSky
2025-10-16 13:10:48 +08:00
committed by GitHub
parent 9d8312fefd
commit f0ec759a5d

47
5.AFK_3x3.py Normal file
View File

@@ -0,0 +1,47 @@
clear()
for i in range(3):
move(North)
move(East)
for i in range(3):
plant(Entities.Bush)
move(North)
move(East)
for i in range(3):
till()
plant(Entities.Carrot)
move(North)
move(East)
while True:
for i in range(3):
if can_harvest():
harvest()
change_hat(Hats.Purple_Hat)
move(North)
else:
do_a_flip()
change_hat(Hats.Gray_Hat)
move(North)
move(East)
for i in range(3):
if can_harvest():
harvest()
plant(Entities.Bush)
change_hat(Hats.Green_Hat)
move(North)
else:
do_a_flip()
change_hat(Hats.Gray_Hat)
move(North)
move(East)
for i in range(3):
if can_harvest():
harvest()
plant(Entities.Carrot)
change_hat(Hats.Brown_Hat)
move(North)
else:
do_a_flip()
change_hat(Hats.Gray_Hat)
move(North)
move(East)