Implement AFK farming routine in 5.AFK.py
This commit is contained in:
64
5.AFK.py
Normal file
64
5.AFK.py
Normal file
@@ -0,0 +1,64 @@
|
||||
clear()
|
||||
range_x=4
|
||||
range_y=4
|
||||
for i in range(range_y):
|
||||
move(North)
|
||||
move(East)
|
||||
for i in range(range_y):
|
||||
plant(Entities.Bush)
|
||||
move(North)
|
||||
move(East)
|
||||
for i in range(range_y):
|
||||
plant(Entities.Bush)
|
||||
move(North)
|
||||
move(East)
|
||||
for i in range(range_y):
|
||||
till()
|
||||
plant(Entities.Carrot)
|
||||
move(North)
|
||||
move(East)
|
||||
|
||||
while True:
|
||||
for i in range(range_y):
|
||||
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(range_y):
|
||||
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(range_y):
|
||||
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(range_y):
|
||||
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)
|
||||
Reference in New Issue
Block a user